diff --git a/nixos/module.nix b/nixos/module.nix index efdd1a2..d17a68e 100644 --- a/nixos/module.nix +++ b/nixos/module.nix @@ -103,6 +103,11 @@ in after = [ "network-online.target" ]; wants = [ "network-online.target" ]; + # Prevent self-interruption during nixos-rebuild switch + # The service will continue running the old version until manually restarted + stopIfChanged = false; + restartIfChanged = false; + environment = cfg.environment // { # Nix needs a writable cache for git flake fetching XDG_CACHE_HOME = "/var/cache/homelab-deploy";