Skip to content

Turn module into file path.#242

Closed
catwith1hat wants to merge 1 commit intoryantm:mainfrom
catwith1hat:modules-are-paths
Closed

Turn module into file path.#242
catwith1hat wants to merge 1 commit intoryantm:mainfrom
catwith1hat:modules-are-paths

Conversation

@catwith1hat
Copy link

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.

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.
@catwith1hat
Copy link
Author

No response and now has a merge conflict. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant