mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 01:31:33 +01:00
sops: Streamline bitwarden integration
This commit is contained in:
parent
435a70a4e9
commit
f845b093f1
2 changed files with 5 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue