nixos-rebuild-ng: pass the NIXOS_NO_CHECK variable through the systemd-run and sudo invocations
This allows to skip nixos pre-switch check when running switch-to-configuration.
This commit is contained in:
@@ -140,5 +140,16 @@
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
security =
|
||||
let
|
||||
extraConfig = ''
|
||||
Defaults env_keep+=NIXOS_NO_CHECK
|
||||
'';
|
||||
in
|
||||
{
|
||||
sudo = { inherit extraConfig; };
|
||||
sudo-rs = { inherit extraConfig; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ SWITCH_TO_CONFIGURATION_CMD_PREFIX: Final = [
|
||||
"LOCALE_ARCHIVE",
|
||||
"-E",
|
||||
"NIXOS_INSTALL_BOOTLOADER",
|
||||
"-E",
|
||||
"NIXOS_NO_CHECK",
|
||||
"--collect",
|
||||
"--no-ask-password",
|
||||
"--pipe",
|
||||
|
||||
Reference in New Issue
Block a user