moved sudo request to top of nixclean and nixupdate

This commit is contained in:
2026-03-19 13:20:15 -05:00
parent 2105c339f7
commit 55e2ed9f99
2 changed files with 2 additions and 2 deletions

View File

@@ -2,8 +2,8 @@
pkgs.writeShellScriptBin "nixclean" '' pkgs.writeShellScriptBin "nixclean" ''
set -Eeuo pipefail set -Eeuo pipefail
nix-collect-garbage -d
sudo -v sudo -v
nix-collect-garbage -d
sudo nix-collect-garbage -d sudo nix-collect-garbage -d
rebuild rebuild
'' ''

View File

@@ -2,9 +2,9 @@
pkgs.writeShellScriptBin "nixupdate" '' pkgs.writeShellScriptBin "nixupdate" ''
set -Eeuo pipefail set -Eeuo pipefail
sudo -v
cd /home/joe/.config/nix cd /home/joe/.config/nix
nix flake update nix flake update
sudo -v
sudo nixos-rebuild --flake .#$hostname boot sudo nixos-rebuild --flake .#$hostname boot
sudo reboot sudo reboot
'' ''