From 332b06fd9baefdfa2b043b8e2c72b8c110940fc5 Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Thu, 27 Aug 2026 23:15:39 -0700 Subject: idk --- users/kassouni/palette/rebuild.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 users/kassouni/palette/rebuild.nix (limited to 'users/kassouni/palette/rebuild.nix') diff --git a/users/kassouni/palette/rebuild.nix b/users/kassouni/palette/rebuild.nix new file mode 100644 index 0000000..e42a7c5 --- /dev/null +++ b/users/kassouni/palette/rebuild.nix @@ -0,0 +1,20 @@ +{ writers, ghostty }: +{ + name = "rebuild"; + icon = "󱄅"; + # Rebuilds need a terminal: sudo prompts for a password and nixos-rebuild + # streams a lot of output. Spawn ghostty with a login shell so it inherits + # the system sudo (setuid) and the user's nix from PATH. Mirrors `make rebuild`. + exe = writers.writeBash "rebuild" '' + set -eu + exec ${ghostty}/bin/ghostty -e bash -lc ' + set -eu + cd /home/kassouni/Developer/nixos-config + nix flake update xmonad-config + sudo nixos-rebuild switch --flake . + echo + echo "Rebuild finished. Press enter to close." + read -r _ + ' + ''; +} -- cgit v1.3.1