sops: Streamline bitwarden integration

This commit is contained in:
SebastianStork 2025-12-24 01:03:15 +01:00
parent 435a70a4e9
commit f845b093f1
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI
2 changed files with 5 additions and 10 deletions

View file

@ -47,15 +47,12 @@
pkgs.ssh-to-age
];
nativeBuildInputs = [
pkgs.bitwarden-cli
pkgs.jq
];
nativeBuildInputs = [ pkgs.bitwarden-cli ];
shellHook = ''
if BW_SESSION="$(bw login --raw)"; then
if BW_SESSION="$(bw unlock --raw || bw login --raw)"; then
export BW_SESSION
fi
SOPS_AGE_KEY="$(bw get item 'admin age-key' | jq -r '.notes')"
SOPS_AGE_KEY="$(bw get notes 'admin age-key')"
export SOPS_AGE_KEY
SOPS_CONFIG="${self'.packages.sops-config}"
export SOPS_CONFIG