refactor: keep options/config top-level

This commit is contained in:
Sridhar Ratnakumar 2024-07-09 16:49:49 -04:00
parent f48d891b14
commit dfbf5ddf9e
No known key found for this signature in database

View File

@ -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))
];
};
};
};
}