This should fix it I hope

main
kalle 2024-12-26 20:48:00 +01:00
parent 31adf4f3a6
commit 4e543200f4
2 changed files with 10 additions and 6 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.qcow2 *.qcow2
/result

View File

@ -39,24 +39,27 @@
sops.secrets = { sops.secrets = {
"traefik/acmeEmail" = { "traefik/acmeEmail" = {
owner = "traefik"; owner = "traefik";
# format = "dotenv";
}; };
"traefik/CLOUDFLARE_EMAIL" = { "traefik/CLOUDFLARE_EMAIL" = {
owner = "traefik"; owner = "traefik";
# format = "dotenv";
}; };
"traefik/CLOUDFLARE_DNS_API_TOKEN" = { "traefik/CLOUDFLARE_DNS_API_TOKEN" = {
owner = "traefik"; owner = "traefik";
# format = "dotenv";
}; };
}; };
sops.templates."traefik.env" = {
owner = "traefik";
content = ''
acmeEmail="${config.sops.placeholder."traefik/acmeEmail"}"
CLOUDFLARE_EMAIL="${config.sops.placeholder."traefik/CLOUDFLARE_EMAIL"}"
CLOUDFLARE_DNS_API_TOKEN="${config.sops.placeholder."traefik/CLOUDFLARE_DNS_API_TOKEN"}"
'';
};
services.traefik = { services.traefik = {
enable = true; enable = true;
environmentFiles = [ environmentFiles = [
config.sops.secrets."traefik/acmeEmail".path config.sops.templates."traefik.env".path
config.sops.secrets."traefik/CLOUDFLARE_EMAIL".path
config.sops.secrets."traefik/CLOUDFLARE_DNS_API_TOKEN".path
]; ];
staticConfigOptions = { staticConfigOptions = {