nix-dotfiles/profiles/sops.nix

30 lines
941 B
Nix
Raw Normal View History

{ config, pkgs, ... }:
{
environment.systemPackages = [
pkgs.ssh-to-age
pkgs.sops
];
2024-03-31 04:45:05 +02:00
# imports = [ nix-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";
2023-12-06 22:21:44 +01:00
sops.defaultSopsFile = "/etc/nixos/nix-dotfiles/secrets/secrets.yaml";
sops.validateSopsFiles = false;
2024-03-31 04:45:05 +02:00
# This will automaticx-sopsally import SSH keys as age keys
sops.age.sshKeyPaths = [
"/etc/ssh/nixos"
#"/$HOME/.ssh/nixos"
2024-04-14 16:13:53 +02:00
#"/home/gunalx/.ssh/nixos"
];
# 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."myservice/my_subdir/my_secret" = {};
}