diff options
| author | Alexander Kassouni <alex@kassouni.net> | 2026-08-29 23:53:40 -0700 |
|---|---|---|
| committer | Alexander Kassouni <alex@kassouni.net> | 2026-08-29 23:53:40 -0700 |
| commit | af99b4960a9bf1043234354d685ed23818c14aaa (patch) | |
| tree | 9d6bd855c76c2c99e16321e1df4eeaadade28739 /users/kassouni/palette/rebuild.nix | |
| parent | 8dcf355819cc6cd1e87924218c1adcd900ecda84 (diff) | |
new laptop
Diffstat (limited to 'users/kassouni/palette/rebuild.nix')
| -rw-r--r-- | users/kassouni/palette/rebuild.nix | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/users/kassouni/palette/rebuild.nix b/users/kassouni/palette/rebuild.nix index e42a7c5..edffa6b 100644 --- a/users/kassouni/palette/rebuild.nix +++ b/users/kassouni/palette/rebuild.nix @@ -1,20 +1,24 @@ -{ writers, ghostty }: +{ pkgs, ... }: { - 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 _ - ' - ''; + kassouni.palette.commands = [ + { + 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 = pkgs.writers.writeBash "rebuild" '' + set -eu + exec ${pkgs.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 _ + ' + ''; + } + ]; } |
