nix-config/hosts/franz/arion/auth/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

2024-05-03 12:19:03 +02:00
{config, ...}: let
vars = import ../../../../vars.nix;
in {
virtualisation.arion = {
projects.auth.settings = {
imports = [./arion-compose.nix];
};
};
sops.secrets."auth/postgres_db" = {
owner = vars.user;
};
sops.secrets."auth/postgres_user" = {
owner = vars.user;
};
sops.secrets."auth/postgres_pw" = {
owner = vars.user;
};
sops.secrets."auth/authentik_secret_key" = {
owner = vars.user;
};
2024-08-09 16:00:07 +02:00
sops.templates."auth-postgres.env" = {
2024-05-03 12:19:03 +02:00
path = "/home/${vars.user}/.docker/auth/postgres.env";
owner = vars.user;
mode = "0775";
content = ''
POSTGRES_PASSWORD="${config.sops.placeholder."auth/postgres_pw"}"
POSTGRES_USER="${config.sops.placeholder."auth/postgres_user"}"
POSTGRES_DB="${config.sops.placeholder."auth/postgres_db"}"
'';
};
2024-08-09 16:00:07 +02:00
sops.templates."auth-authentik.env" = {
2024-05-03 12:19:03 +02:00
path = "/home/${vars.user}/.docker/auth/authentik.env";
owner = vars.user;
mode = "0775";
content = ''
AUTHENTIK_POSTGRESQL__PASSWORD="${config.sops.placeholder."auth/postgres_pw"}"
AUTHENTIK_POSTGRESQL__USER="${config.sops.placeholder."auth/postgres_user"}"
AUTHENTIK_POSTGRESQL__NAME="${config.sops.placeholder."auth/postgres_db"}"
AUTHENTIK_SECRET_KEY="${config.sops.placeholder."auth/authentik_secret_key"}"
'';
};
}