include post-change configuration in allActivationScripts passthru
This commit is contained in:
parent
4268754afb
commit
af46de5628
1 changed files with 13 additions and 15 deletions
|
|
@ -115,21 +115,19 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
allActivations = config.dynamicism.for
|
||||
|> lib.filterAttrs (name: submod: submod.enable)
|
||||
|> lib.mapAttrsToList (name: submod: submod.activate);
|
||||
allActivationScripts = pkgs.writeShellApplication {
|
||||
name = "dynamicism-activate";
|
||||
runtimeInputs = allActivations;
|
||||
text = nixosAfter.config.dynamicism.for
|
||||
|> lib.filterAttrs (name: submod: submod.enable)
|
||||
|> lib.mapAttrsToList (name: submod: ''
|
||||
echo "Activating dynamicism for ${name}"
|
||||
${lib.getExe submod.activate}
|
||||
'')
|
||||
|> lib.concatStringsSep "\n";
|
||||
};
|
||||
in allActivationScripts;
|
||||
runAllActivationScripts = nixosAfter.config.dynamicism.for
|
||||
|> lib.filterAttrs (lib.const (lib.getAttr "enable"))
|
||||
|> lib.mapAttrsToList (name: submod: ''
|
||||
echo "Activating dynamic configuration for ${name}"
|
||||
${lib.getExe submod.activate}
|
||||
'')
|
||||
|> lib.concatStringsSep "\n";
|
||||
|
||||
in pkgs.writeShellApplication {
|
||||
name = "dynamicism-activate";
|
||||
text = runAllActivationScripts;
|
||||
passthru.configuration = nixosAfter;
|
||||
};
|
||||
|
||||
finalSettings = config.dynamicism.for
|
||||
|> recUpdateFoldlAttrs (name: { ... }@submod: finalSettingsFor submod)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue