summaryrefslogtreecommitdiffstats
path: root/krops.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krops.nix')
-rw-r--r--krops.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/krops.nix b/krops.nix
index 6a8c967e..4e531132 100644
--- a/krops.nix
+++ b/krops.nix
@@ -196,6 +196,10 @@ rec {
old_gen=$(readlink -f /nix/var/nix/profiles/system)
new_gen=$(readlink -f "$system")
if [ "x$old_gen" != "x$new_gen" ]; then
+ ${lib.optionalString (switch == "switch") /* sh */ ''
+ "$system"/bin/switch-to-configuration check
+ export NIXOS_NO_CHECK=1
+ ''}
nix-env -p /nix/var/nix/profiles/system --set "$system"
"$system"/bin/switch-to-configuration ${switch}
else
@@ -503,8 +507,13 @@ rec {
old_gen=$(readlink -f /nix/var/nix/profiles/system)
new_gen=$(readlink -f "$system")
if [ "x$old_gen" != "x$new_gen" ]; then
+ ${lib.optionalString (switch == "switch") /* sh */ ''
+ "$system"/bin/switch-to-configuration check
+ export NIXOS_NO_CHECK=1
+ ''}
nix-env -p /nix/var/nix/profiles/system --set "$system"
systemd-run --pipe --wait --collect --quiet \
+ --setenv=NIXOS_NO_CHECK="''${NIXOS_NO_CHECK-}" \
"$system"/bin/switch-to-configuration ${switch}
else
echo 'Configuration is already up to date' >&2