summaryrefslogtreecommitdiff
path: root/rebuild
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild')
-rwxr-xr-xrebuild7
1 files changed, 7 insertions, 0 deletions
diff --git a/rebuild b/rebuild
index 91ea7a1..cb92b80 100755
--- a/rebuild
+++ b/rebuild
@@ -1,2 +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)" $@