24 lines
611 B
Nix
24 lines
611 B
Nix
{ inputs, pkgs, lib, config, ... }:
|
|
let
|
|
secretspath = builtins.toString inputs.mysecrets;
|
|
in
|
|
{
|
|
imports = [
|
|
inputs.sops-nix.nixosModules.sops
|
|
];
|
|
|
|
sops = {
|
|
defaultSopsFile = "${secretspath}/secrets.yaml";
|
|
validateSopsFiles = false;
|
|
|
|
age = {
|
|
# automatically import host SSH keys as age keys
|
|
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
# this will use an age key that is expecte to already be in the filesystem
|
|
keyFile = "/var/lib/sops-nix/key.txt";
|
|
# generate a new key if the key specified above does not exist
|
|
generateKey = true;
|
|
};
|
|
};
|
|
|
|
}
|