feat: configure sops
Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
ca89fcd828
commit
7220043169
3 changed files with 29 additions and 1 deletions
15
hosts/common/global/sops.nix
Normal file
15
hosts/common/global/sops.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue