forked from fabian/nix_config
doctrine/lib: refactor 'close' helper
This commit is contained in:
parent
a8ef8e43b9
commit
2fe1f36eb9
3 changed files with 20 additions and 13 deletions
|
@ -26,13 +26,9 @@ in {
|
|||
lib.optionalAttrs (configFiles ? ${doctrine.namespace})
|
||||
(lib.mkIf cfg.enable configSet);
|
||||
|
||||
options = lib.optionalAttrs (options
|
||||
!= null
|
||||
&& optionsSet ? ${doctrine.namespace}) {
|
||||
${doctrine.prefix}.${name} =
|
||||
optionsSet.${doctrine.namespace}
|
||||
// {
|
||||
enable = lib.mkEnableOption name;
|
||||
};
|
||||
};
|
||||
options.${doctrine.prefix}.${name} =
|
||||
lib.optionalAttrs (options != null && optionsSet ? ${doctrine.namespace}) optionsSet.${doctrine.namespace}
|
||||
// {
|
||||
enable = lib.mkEnableOption name;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue