mirror of
https://github.com/juspay/services-flake.git
synced 2024-11-04 00:34:48 +03:00
refactor: keep options/config top-level
This commit is contained in:
parent
f48d891b14
commit
dfbf5ddf9e
10
nix/lib.nix
10
nix/lib.nix
@ -55,7 +55,8 @@
|
||||
};
|
||||
in
|
||||
{
|
||||
options.services.${service} = lib.mkOption {
|
||||
options = {
|
||||
services.${service} = lib.mkOption {
|
||||
description = ''
|
||||
${service} service
|
||||
'';
|
||||
@ -68,10 +69,15 @@
|
||||
];
|
||||
});
|
||||
};
|
||||
config.settings.imports =
|
||||
};
|
||||
config = {
|
||||
settings = {
|
||||
imports =
|
||||
lib.pipe config.services.${service} [
|
||||
(lib.filterAttrs (_: cfg: cfg.enable))
|
||||
(lib.mapAttrsToList (_: cfg: cfg.outputs.settings))
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user