nix-config/hosts/common/global/sops.nix
Lander Van den Bulcke 7220043169
feat: configure sops
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
2024-08-29 10:04:37 +02:00

15 lines
287 B
Nix

{ inputs, config, ... }:
let
isEd25519 = k: k.type == "ed25519";
getKeyPath = k: k.path;
keys = builtins.filter isEd25519 config.services.openssh.hostKeys;
in {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
age.sshKeyPaths = map getKeyPath keys;
};
}