how did THAT break it
This commit is contained in:
parent
3765e918d6
commit
d76474c524
1 changed files with 26 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ let
|
|||
|
||||
inherit (import ./lib.nix { inherit lib; })
|
||||
typeCheck
|
||||
convenientAttrPath
|
||||
executablePathInStore
|
||||
concatFoldl
|
||||
recUpdateFoldl
|
||||
recUpdateFoldlAttrs
|
||||
|
|
@ -79,6 +81,11 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
finalActivationScript = mkOption {
|
||||
type = executablePathInStore;
|
||||
internal = true;
|
||||
};
|
||||
|
||||
applyDynamicConfiguration = mkOption {
|
||||
#type = t.functionTo t.pathInStore;
|
||||
type = t.functionTo t.raw;
|
||||
|
|
@ -101,6 +108,7 @@ in
|
|||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||
in ''
|
||||
if [[ -d "${dropinDir}" ]]; then
|
||||
echo "Removing files in "${dropinDir}"
|
||||
echo "Removing files in "${dropinDir}" >&2
|
||||
|
||||
rm -rvf "${dropinDir}/"*
|
||||
|
|
@ -115,8 +123,13 @@ in
|
|||
name = "dynix-reset-dynamicism-for-${name}";
|
||||
value.deps = [ "etc" "stdio" "specialfs" "binsh" "usrbinenv" "var" "udevd" ];
|
||||
value.text = ''
|
||||
set -x
|
||||
echo "Removing existing dynamic overrides for ${name}"
|
||||
echo "Removing existing dynamic overrides for ${name}" >&2
|
||||
|
||||
${submod.systemd-services-updated |> lib.map forUnit |> lib.concatStringsSep "\n"}
|
||||
|
||||
set +x
|
||||
'';
|
||||
});
|
||||
|
||||
|
|
@ -152,7 +165,8 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
submodulesChanged = nixosAfter.config.dynamicism.finalEnabledSubmodules
|
||||
submodulesChanged = nixosAfter.config.dynamicism.for
|
||||
|> lib.filterAttrs (lib.const (lib.getAttr "enable"))
|
||||
|> lib.filterAttrs (submodName: _:
|
||||
nixosBefore.config.dynamicism.for.${submodName}.finalSettings
|
||||
!=
|
||||
|
|
@ -174,6 +188,17 @@ in
|
|||
passthru.configuration = nixosAfter;
|
||||
};
|
||||
|
||||
finalActivationScript = pkgs.writeShellApplication {
|
||||
name = "dynamicism-activate-all";
|
||||
text = 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";
|
||||
};
|
||||
|
||||
finalSettings = config.dynamicism.for
|
||||
|> recUpdateFoldlAttrs (name: { ... }@submod: finalSettingsFor submod)
|
||||
|> checkAssertWarn ourAssertions [ ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue