From 007d6ea4de3a9e9192d8555c2f6e21362fb3e60c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 16 May 2026 12:33:02 -0700 Subject: [PATCH] nixos: harden switch upgrade service guard --- nixos/justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/justfile b/nixos/justfile index 8978dc42..023a4703 100644 --- a/nixos/justfile +++ b/nixos/justfile @@ -1,5 +1,5 @@ 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}} populate-cachix cache="colonelpanic8-dotfiles" host=`hostname` *args: