nixos: harden switch upgrade service guard

This commit is contained in:
2026-05-16 12:33:02 -07:00
parent 24c1a0a4d4
commit 007d6ea4de

View File

@@ -1,5 +1,5 @@
switch *args: switch *args:
if systemctl is-active --quiet nixos-upgrade.service; then sudo systemctl stop nixos-upgrade.service; fi case "$(systemctl show -P ActiveState nixos-upgrade.service 2>/dev/null)" in active|activating|reloading) sudo systemctl stop nixos-upgrade.service;; esac
sudo nixos-rebuild switch --flake ".#" --impure {{args}} sudo nixos-rebuild switch --flake ".#" --impure {{args}}
populate-cachix cache="colonelpanic8-dotfiles" host=`hostname` *args: populate-cachix cache="colonelpanic8-dotfiles" host=`hostname` *args: