mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
sops: Get age-key from bitwarden
This commit is contained in:
parent
84515f5e14
commit
b94d8d611b
1 changed files with 10 additions and 1 deletions
|
|
@ -39,12 +39,21 @@
|
|||
'';
|
||||
|
||||
devShells.sops = pkgs.mkShellNoCC {
|
||||
SOPS_CONFIG = self'.packages.sops-config;
|
||||
packages = [
|
||||
pkgs.sops
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.bitwarden-cli
|
||||
pkgs.jq
|
||||
];
|
||||
shellHook = ''
|
||||
export BW_SESSION=$(bw login | awk -F'"' '/export BW_SESSION/ {print $2}')
|
||||
export SOPS_AGE_KEY=$(bw get item 'admin age-key' | jq -r '.notes')
|
||||
export SOPS_CONFIG=${self'.packages.sops-config}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue