sops: Get age-key from bitwarden

This commit is contained in:
SebastianStork 2025-08-17 22:10:19 +02:00
parent 84515f5e14
commit b94d8d611b

View file

@ -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}
'';
};
};
}