Use sudo with darwin-rebuild, too

This commit is contained in:
2026-04-28 21:06:34 +02:00
parent dbc6551b0c
commit 2bf2f60bde

View File

@@ -99,12 +99,7 @@ nix-deploy() {
local run_cmd=($cmd)
command -v "$cmd" >/dev/null 2>&1 || run_cmd=(nix run "$r_flake" --)
if [[ "$OSTYPE" == darwin* ]]; then
"${run_cmd[@]}" switch --flake . |& nom
else
sudo "${run_cmd[@]}" switch --flake . |& nom
fi
sudo "${run_cmd[@]}" switch --flake . |& nom
# home-manager switch if exists.
local hm_conf="$(whoami)@$(hostname -s)"