about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-08-26T15·55-0400
committergrfn <grfn@gws.fyi>2021-08-26T19·10+0000
commit8201f0f3d80c9d8c3234269c4f3420e8723e5bab (patch)
treeb851faff96c8f149982a13cf015a88b9144f3d2d
parent72ebd3411bf79c16b5f3be99a3f6aacaf5fb9be5 (diff)
refactor(gs/system): Remove rebuilder script r/2790
I no longer use this, I just use the rebuild-system that all nixos
systems get now.

Change-Id: I2272ff13b21b3194c06b51dbc340c19b8bb336a9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3430
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
-rw-r--r--users/grfn/system/system/default.nix29
-rw-r--r--users/grfn/system/system/modules/common.nix1
2 files changed, 0 insertions, 30 deletions
diff --git a/users/grfn/system/system/default.nix b/users/grfn/system/system/default.nix
index 489be1369bc0..bc8f7f8844c0 100644
--- a/users/grfn/system/system/default.nix
+++ b/users/grfn/system/system/default.nix
@@ -43,33 +43,4 @@ rec {
 
     "iso"
   ];
-
-  rebuilder =
-    let
-      depotPath = "/home/grfn/code/depot";
-
-      caseFor = hostname: ''
-        ${hostname})
-          echo "Rebuilding NixOS for //users/grfn/nixos/${hostname}"
-          system=$(nix-build -E '(import ${depotPath} {}).users.grfn.system.system.${hostname}' --no-out-link)
-          ;;
-      '';
-    in pkgs.writeShellScriptBin "rebuilder" ''
-      set -ue
-      if [[ $EUID -ne 0 ]]; then
-        echo "Oh no! Only root is allowed to rebuild the system!" >&2
-        exit 1
-      fi
-
-      case $HOSTNAME in
-      ${caseFor "chupacabra"}
-      *)
-        echo "$HOSTNAME is not a known NixOS host!" >&2
-        exit 1
-        ;;
-      esac
-
-      nix-env -p /nix/var/nix/profiles/system --set $system
-      $system/bin/switch-to-configuration switch
-    '';
 }
diff --git a/users/grfn/system/system/modules/common.nix b/users/grfn/system/system/modules/common.nix
index f25c9ff3288c..741b0473a5a9 100644
--- a/users/grfn/system/system/modules/common.nix
+++ b/users/grfn/system/system/modules/common.nix
@@ -31,7 +31,6 @@ with lib;
     file
     lm_sensors
     dnsutils
-    depot.users.grfn.system.system.rebuilder
     htop
   ];