2024-06-04 18:00:43 +02:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
2024-06-12 21:40:04 +02:00
|
|
|
secretsDirectory = builtins.toString (inputs.nix-secrets or "");
|
2024-06-04 18:00:43 +02:00
|
|
|
in {
|
2024-06-12 21:40:04 +02:00
|
|
|
config = lib.mkIf (inputs ? nix-secrets) {
|
|
|
|
sops = {
|
|
|
|
defaultSopsFile = "${secretsDirectory}/common.yaml";
|
|
|
|
validateSopsFiles = false;
|
|
|
|
age = {
|
|
|
|
sshKeyPaths = ["${config.home.homeDirectory}/.ssh/id_ed25519"];
|
|
|
|
keyFile = "${config.home.homeDirectory}/.config/sops-nix/key.txt";
|
|
|
|
generateKey = true;
|
|
|
|
};
|
2024-06-04 18:00:43 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|