The Simulacrum: Stage 1 #108

Merged
max merged 15 commits from pr-simulacrum-stage-1 into master 2024-08-13 22:06:49 +03:00
2 changed files with 10 additions and 6 deletions
Showing only changes of commit 532a569c66 - Show all commits

View file

@ -2,9 +2,9 @@
with lib;
{
options.out.injectNixosConfig = mkOption {
description = "NixOS configuration to inject into the given host.";
type = with types; functionTo raw;
options.out = mkOption {
description = "Output functions.";
type = with types; lazyAttrsOf (functionTo raw);
default = const [];
};
}

View file

@ -39,7 +39,11 @@ in
default = {};
};
config.out.injectNixosConfig = hostName: (lib.flatten (lib.mapAttrsToList (getHostConfigurations hostName) config.services)) ++ [
config.out = {
injectNixosConfigForServices = services: hostName: (lib.flatten (lib.mapAttrsToList (getHostConfigurations hostName) (lib.getAttrs services config.services))) ++ [
introspectionModule
];
injectNixosConfig = config.out.injectNixosConfigForServices (lib.attrNames config.services);
};
}