1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00
nixos/secrets/shell.nix
Stefan Ellmauthaler 54327482e3
Redesign/flake (#4)
Redesign flake and update to 22.05
2022-06-10 21:32:48 +02:00

16 lines
419 B
Nix

{ pkgs ? import <nixpkgs> { }
, sops-nix ? pkgs.callPackage <sops-nix> { }
, ...
}:
let
sops-rekey = pkgs.writeShellScriptBin "sops-rekey" ''
${pkgs.findutils}/bin/find . -wholename '*/secrets/*.yaml' -exec ${pkgs.sops}/bin/sops updatekeys {} \;
'';
in
pkgs.mkShell {
sopsPGPKeyDirs = [ ./keys/users ./keys/hosts ];
nativeBuildInputs = [ sops-nix.sops-import-keys-hook sops-nix.ssh-to-pgp sops-rekey ];
}