sops: Fix dev-shell and insaller-script

This commit is contained in:
SebastianStork 2025-09-16 21:10:45 +02:00
parent 8be51907fa
commit 697eae282e
2 changed files with 6 additions and 4 deletions

View file

@ -40,8 +40,9 @@ _: {
sed -i -E "s|(agePublicKey\s*=\s*\")[^\"]*(\";)|\1$new_age_key\2|" "hosts/$host/default.nix" sed -i -E "s|(agePublicKey\s*=\s*\")[^\"]*(\";)|\1$new_age_key\2|" "hosts/$host/default.nix"
echo "==> Updating SOPS secrets..." echo "==> Updating SOPS secrets..."
BW_SESSION="$(bw login --raw)" if BW_SESSION="$(bw login --raw)"; then
export BW_SESSION export BW_SESSION
fi
SOPS_AGE_KEY="$(bw get item 'admin age-key' | jq -r '.notes')" SOPS_AGE_KEY="$(bw get item 'admin age-key' | jq -r '.notes')"
export SOPS_AGE_KEY export SOPS_AGE_KEY
SOPS_CONFIG="$(nix build .#sops-config --print-out-paths)" SOPS_CONFIG="$(nix build .#sops-config --print-out-paths)"

View file

@ -50,8 +50,9 @@
pkgs.jq pkgs.jq
]; ];
shellHook = '' shellHook = ''
BW_SESSION="$(bw login --raw)" if BW_SESSION="$(bw login --raw)"; then
export BW_SESSION export BW_SESSION
fi
SOPS_AGE_KEY="$(bw get item 'admin age-key' | jq -r '.notes')" SOPS_AGE_KEY="$(bw get item 'admin age-key' | jq -r '.notes')"
export SOPS_AGE_KEY export SOPS_AGE_KEY
SOPS_CONFIG="${self'.packages.sops-config}" SOPS_CONFIG="${self'.packages.sops-config}"