nixos-combined-flake/modules/nixos/sops/default.nix

22 lines
787 B
Nix

{ inputs, ... }: {
imports = [ inputs.sops-nix.nixosModules.sops ];
# This will add secrets.yml to the nix store
# You can avoid this by adding a string to the full path instead, i.e.
# sops.defaultSopsFile = "/root/.sops/secrets/example.yaml";
sops = {
defaultSopsFile = ../../../secrets/general.yaml;
# This will automatically import SSH keys as age keys
age = {
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# This is using an age key that is expected to already be in the filesystem
keyFile = "/var/lib/sops-nix/key.txt";
# This will generate a new key if the key specified above does not exist
generateKey = true;
};
# This is the actual specification of the secrets.
secrets = {
hello = { };
};
};
}