From 4360850f82a533477593093b42d2393dfdafd19e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 22 May 2026 05:02:42 -0700 Subject: [PATCH] nixos: use sudo wrapper for switch recipe --- nixos/justfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/justfile b/nixos/justfile index 023a4703..6f9a894b 100644 --- a/nixos/justfile +++ b/nixos/justfile @@ -1,6 +1,6 @@ switch *args: - 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}} + case "$(systemctl show -P ActiveState nixos-upgrade.service 2>/dev/null)" in active|activating|reloading) /run/wrappers/bin/sudo systemctl stop nixos-upgrade.service;; esac + /run/wrappers/bin/sudo nixos-rebuild switch --flake ".#" --impure {{args}} populate-cachix cache="colonelpanic8-dotfiles" host=`hostname` *args: store_path="$(nix build --no-link --print-out-paths ".#nixosConfigurations.{{host}}.config.system.build.toplevel" --impure --option warn-dirty false {{args}})" && cachix push {{cache}} "$store_path