nixos/hosts/common/core/sops.nix

27 lines
630 B
Nix

{ pkgs, inputs, config, configVars, ... }:
let
secretsDirectory = builtins.toString inputs.nix-secrets;
secretsFile = "${secretsDirectory}/secrets.yaml";
in
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
defaultSopsFile = "${secretsFile}";
validateSopsFiles = false;
secrets = {
"ssh_keys/deploy_key/deploy_key-ssh-ed25519" = {
path = "/etc/ssh/deploy_key-ssh-ed25519";
};
"ssh_keys/deploy_key/deploy_key-ssh-ed25519.pub" = {
path = "/etc/ssh/deploy_key-ssh-ed25519.pub";
};
};
};
}