From 0538c0398cbf338ad1261b1f58a01d3aaed94d50 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sat, 28 Mar 2026 12:45:48 -0500 Subject: add warning to rebuild if age key is missing for sops and simplify sops config --- rebuild | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rebuild') 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)" $@ -- cgit v1.2.3