summaryrefslogtreecommitdiff
path: root/rebuild
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild')
-rwxr-xr-xrebuild9
1 files changed, 9 insertions, 0 deletions
diff --git a/rebuild b/rebuild
new file mode 100755
index 0000000..cb92b80
--- /dev/null
+++ b/rebuild
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ ! -f ~/.config/sops/age/keys.txt ]; then
+ mkdir -p ~/.config/sops/age
+ echo "---------------------------------------------------------------------------------------------------"
+ echo "| WARNING: Sops key not found. Please generate one from your ssh key using the following command: |"
+ echo "| nix run nixpkgs#ssh-to-age -- -private-key -i ~/.ssh/private > ~/.config/sops/age/keys.txt |"
+ echo "---------------------------------------------------------------------------------------------------"
+fi
+nixos-rebuild switch --sudo --flake "$(dirname "$0")/#$(hostname)" $@