Add secret handling

This commit is contained in:
Martin Pander
2026-02-07 15:55:01 +01:00
parent a9c5e2398d
commit 61bb1578e0
8 changed files with 91 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
{ inputs, config, ... }:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFormat = "yaml";
age = {
# This will automatically import the SSH keys as age keys
sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
# This is where the age key for sops-nix is stored
keyFile = "/var/lib/sops-nix/key.txt";
# This will generate a new age key from the SSH key if it doesn't exist
generateKey = true;
};
};
}