1
0
Fork 0

modules/nixfiles: Make nixfiles system upgrade not stop itself during upgrade

This commit is contained in:
clerie 2023-12-03 11:28:41 +01:00
parent 421f0d3c90
commit 37c838836e
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ in
};
config = mkIf cfg.enable {
systemd.services.nixfiles-system-auto-upgrade = {
# Make sure this unit does not stop themself while upgrading
restartIfChanged = false;
unitConfig.X-StopOnRemoval = false;
serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.nixfiles-system-upgrade + "/bin/nixfiles-system-upgrade --no-confirm${optionalString cfg.allowReboot " --allow-reboot"}";