mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-14 00:26:24 +00:00
15 lines
286 B
Nix
15 lines
286 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;
|
|
};
|
|
}
|