From ccbb38faf6f20711268545f5c486af538392a147 Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Thu, 2 May 2024 11:55:25 -0400 Subject: [PATCH] hoenn: add automatic privilege elevation --- nixosModules/scripts/hoenn/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixosModules/scripts/hoenn/default.nix b/nixosModules/scripts/hoenn/default.nix index 2538c33c..09d8ff55 100644 --- a/nixosModules/scripts/hoenn/default.nix +++ b/nixosModules/scripts/hoenn/default.nix @@ -11,14 +11,14 @@ if [ "$1" = "sync" ]; then if [ "$2" == "" ] || [ "$2" == "now" ]; then - ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake $FLAKE#$HOST + sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --flake $FLAKE#$HOST exit 0; elif [ "$2" == "boot" ]; then - ${pkgs.nixos-rebuild}/bin/nixos-rebuild boot --flake $FLAKE#$HOST + bin/sudo ${pkgs.nixos-rebuild}/bin/nixos-rebuild boot --flake $FLAKE#$HOST exit 0; fi elif [ "$1" == "gc" ]; then - ${pkgs.nix}/bin/nix-collect-garbage -d + sudo ${pkgs.nix}/bin/nix-collect-garbage -d exit 0; elif [ "$1" == "clone" ]; then ${pkgs.git}/bin/git clone $FLAKE_SRC