2023-09-24 03:59:47 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
environment.systemPackages = [
|
|
|
|
pkgs.ssh-to-age
|
|
|
|
pkgs.sops
|
|
|
|
];
|
|
|
|
|
2024-03-31 04:45:05 +02:00
|
|
|
# imports = [ nix-sops ];
|
2023-09-24 03:59:47 +02:00
|
|
|
|
|
|
|
# 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";
|
2024-11-16 15:06:45 +01:00
|
|
|
# sops.defaultSopsFile = "/etc/nixos/nix-dotfiles/secrets/secrets.yaml";
|
|
|
|
sops = {
|
|
|
|
defaultSopsFile = ../secrets/secrets.yaml;
|
|
|
|
validateSopsFiles = false;
|
|
|
|
|
|
|
|
# This will automaticx-sopsally import SSH keys as age keys
|
|
|
|
age.sshKeyPaths = [
|
2023-12-10 01:20:18 +01:00
|
|
|
"/etc/ssh/nixos"
|
2024-11-15 04:19:05 +01:00
|
|
|
"/root/.ssh/nixos"
|
2023-12-10 01:20:18 +01:00
|
|
|
];
|
2024-11-16 15:06:45 +01:00
|
|
|
# This is using an age key that is expected to already be in the filesystem
|
|
|
|
#age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
|
|
age.keyFile = "/root/.config/sops/age/key.txt";
|
|
|
|
# This will generate a new key if the key specified above does not exist
|
|
|
|
age.generateKey = true;
|
|
|
|
# This is the actual specification of the secrets.
|
|
|
|
#secrets."myservice/my_subdir/my_secret" = {};
|
|
|
|
};
|
2023-09-24 03:59:47 +02:00
|
|
|
}
|