nixos-config/modules/core/sops.nix

48 lines
1 KiB
Nix
Raw Normal View History

2025-07-28 01:00:47 +02:00
{
pkgs,
inputs,
username,
host,
config,
2025-07-28 01:00:47 +02:00
...
}:
{
imports = [ inputs.sops-nix.nixosModules.sops ];
sops = {
defaultSopsFile = ../../secrets/${host}/secrets.yaml;
2025-07-28 01:00:47 +02:00
defaultSopsFormat = "yaml";
age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
secrets =
if (host == "violet") then
{
"systemMailerPassword" = { };
"forgejoWorkerSecret" = { };
2025-08-07 13:41:26 +02:00
"minioRootCredentials" = { };
"matrixRegistrationSecret" = {
owner = "matrix-synapse";
};
2025-08-19 15:14:15 +02:00
"smbLoginDetails" = { };
2025-09-19 12:24:13 +02:00
"syncplay" = { };
}
else if (host == "sakura") then
{
"systemMailerPassword" = { };
2025-08-05 21:01:38 +02:00
"dandelionSyncthingId" = { };
"sakuraSyncthingId" = { };
}
2025-08-01 10:24:49 +02:00
else if (host == "dandelion") then
{
"systemMailerPassword" = { };
2025-08-05 21:01:38 +02:00
"dandelionSyncthingId" = { };
"sakuraSyncthingId" = { };
2025-08-01 10:24:49 +02:00
}
else
{ };
2025-07-28 01:00:47 +02:00
};
environment.systemPackages = with pkgs; [
sops
];
}