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