about summary refs log tree commit diff
path: root/users/glittershark/system/home/modules/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/system/home/modules/common.nix')
-rw-r--r--users/glittershark/system/home/modules/common.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/users/glittershark/system/home/modules/common.nix b/users/glittershark/system/home/modules/common.nix
index 0b295a450b61..d420595adb1d 100644
--- a/users/glittershark/system/home/modules/common.nix
+++ b/users/glittershark/system/home/modules/common.nix
@@ -44,6 +44,16 @@
     nix-prefetch-github
     nix-review
     cachix
+    (writeShellScriptBin "rebuild-mugwump" ''
+      set -eo pipefail
+      cd ~/code/depot
+      nix build -f . users.glittershark.system.system.mugwumpSystem -o /tmp/mugwump
+      nix copy -f . users.glittershark.system.system.mugwumpSystem \
+        --to ssh://mugwump
+      system=$(readlink -ef /tmp/mugwump)
+      ssh mugwump sudo nix-env -p /nix/var/nix/profiles/system --set $system
+      ssh mugwump sudo $system/bin/switch-to-configuration switch
+    '')
   ];
 
   programs.ssh = {