nixos-config/modules/core/sops.nix
2025-12-01 17:49:37 +01:00

50 lines
1.1 KiB
Nix

{
pkgs,
inputs,
username,
host,
config,
...
}:
{
imports = [ inputs.sops-nix.nixosModules.sops ];
sops = {
defaultSopsFile = ../../secrets/${host}/secrets.yaml;
defaultSopsFormat = "yaml";
age.keyFile = "/home/${username}/.config/sops/age/keys.txt";
secrets =
if (host == "violet") then
{
"systemMailerPassword" = { };
"forgejoWorkerSecret" = { };
"minioRootCredentials" = { };
"atticdEnvironment" = { };
"matrixRegistrationSecret" = {
owner = "matrix-synapse";
};
"smbLoginDetails" = { };
"syncplay" = { };
"funkwhaleDjangoSecret" = { };
}
else if (host == "sakura") then
{
"systemMailerPassword" = { };
"dandelionSyncthingId" = { };
"sakuraSyncthingId" = { };
"homeExternalIPv4" = { };
}
else if (host == "dandelion") then
{
"systemMailerPassword" = { };
"dandelionSyncthingId" = { };
"sakuraSyncthingId" = { };
}
else
{ };
};
environment.systemPackages = with pkgs; [
sops
];
}