1
1
mirror of https://github.com/ryantm/agenix.git synced 2024-08-16 17:40:36 +03:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Félinàun Chapeau
434b50b457
Merge bc5eaf40ca into 07479c2e73 2024-05-08 01:22:02 +02:00
Jörg Thalheim
07479c2e73
update link to nixos wiki (#258) 2024-05-07 10:12:37 -07:00
Félinàun Chapeau
bc5eaf40ca
Turn module into file path.
If a module is an attrset deduplicating imports does not work properly
and would lead to the module system complaining about redefining
options. Here is an example:

error: The option `age.identityPaths' in `/nix/store/wn50ysifrfp5qj5pp3jqpyvwh8ksz36y-source/machines/foo' is already declared in `/nix/store/wn50ysifrfp5qj5pp3jqpyvwh8ksz36y-source/common/ddclient/default.nix'.

when common/ddclient/default.nix and machines/foo/default.nix is:

{ ..., agenix, ... }: {
  imports = [
    agenix.nixosModules.age
  ];
}

Turning the module into a filepath fixes the issue.
2024-02-05 09:48:19 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -205,7 +205,7 @@ You can run the CLI tool ad-hoc without installing it:
nix run github:ryantm/agenix -- --help
```
But you can also add it permanently into a [NixOS module](https://nixos.wiki/wiki/NixOS_modules)
But you can also add it permanently into a [NixOS module](https://wiki.nixos.org/wiki/NixOS_modules)
(replace system "x86_64-linux" with your system):
```nix

View File

@ -23,13 +23,13 @@
}: let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in {
nixosModules.age = import ./modules/age.nix;
nixosModules.age = ./modules/age.nix;
nixosModules.default = self.nixosModules.age;
darwinModules.age = import ./modules/age.nix;
darwinModules.age = ./modules/age.nix;
darwinModules.default = self.darwinModules.age;
homeManagerModules.age = import ./modules/age-home.nix;
homeManagerModules.age = ./modules/age-home.nix;
homeManagerModules.default = self.homeManagerModules.age;
overlays.default = import ./overlay.nix;