diff options
Diffstat (limited to 'modules/nixos/sops.nix')
| -rw-r--r-- | modules/nixos/sops.nix | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/nixos/sops.nix b/modules/nixos/sops.nix new file mode 100644 index 0000000..41e828e --- /dev/null +++ b/modules/nixos/sops.nix @@ -0,0 +1,15 @@ +{config, ... }: { + # 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/example.yaml; + # This will automatically import SSH keys as age keys + sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; + # This is using an age key that is expected to already be in the filesystem + sops.age.keyFile = "/var/lib/sops-nix/key.txt"; + # This will generate a new key if the key specified above does not exist + sops.age.generateKey = true; + # This is the actual specification of the secrets. + # sops.secrets.example-key = {}; + # sops.secrets.example_array = {}; +} |
