From f13e88ab071716537e1da14379c4853441c57fa2 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Fri, 23 Oct 2020 11:11:11 -0400 Subject: feat(gs/home): Add script to rebuild mugwump Eventually this should be generalized, but for now this is good enough + nice to have Change-Id: Icca815b651cfb6f8f0cd2d6a1f64e56c63d2fef5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2057 Reviewed-by: glittershark Tested-by: BuildkiteCI --- users/glittershark/system/home/machines/chupacabra.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/users/glittershark/system/home/machines/chupacabra.nix b/users/glittershark/system/home/machines/chupacabra.nix index b6940dc831..a3d841839b 100644 --- a/users/glittershark/system/home/machines/chupacabra.nix +++ b/users/glittershark/system/home/machines/chupacabra.nix @@ -49,5 +49,15 @@ in { home.packages = with pkgs; [ steam xorg.libxcb + (writeShellScriptBin "rebuild-mugwump" '' + set -eo pipefail + cd ~/code/depot + nix build -f . users.glittershark.system.system.mugwumpSystem -o mugwump + nix copy -f . users.glittershark.system.system.mugwumpSystem \ + --to ssh://mugwump + system=$(readlink -ef mugwump) + ssh mugwump sudo nix-env -p /nix/var/nix/profiles/system --set $system + ssh mugwump sudo $system/bin/switch-to-configuration switch + '') ]; } -- cgit 1.4.1