52 lines
998 B
Nix
52 lines
998 B
Nix
{ config, ... }:
|
|||
|
|
|
||
|
|
{
|
||
|
|
services.traefik = {
|
||
|
|
enable = true;
|
||
|
|
group = "docker";
|
||
|
|
environmentFiles = [
|
||
|
|
config.sops.secrets.traefik.path
|
||
|
|
];
|
||
|
|
staticConfigOptions = {
|
||
|
|
api = {
|
||
|
|
dashboard = true;
|
||
|
|
insecure = true;
|
||
|
|
};
|
||
|
|
certificatesResolvers = {
|
||
|
|
letsencrypt = {
|
||
|
|
acme = {
|
||
|
|
email = "[email protected]";
|
||
|
|
storage = "/var/lib/traefik/acme.json";
|
||
|
|
dnsChallenge = {
|
||
|
|
provider = "cloudflare";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
entryPoints = {
|
||
|
|
web = {
|
||
|
|
address = ":80";
|
||
|
|
http = {
|
||
|
|
redirections = {
|
||
|
|
entryPoint = {
|
||
|
|
to = "websecure";
|
||
|
|
scheme = "https";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
websecure = {
|
||
|
|
address = ":443";
|
||
|
|
};
|
||
|
|
};
|
||
|
|
providers = {
|
||
|
|
docker = { };
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
sops.secrets.traefik = {
|
||
|
|
owner = "traefik";
|
||
|
|
};
|
||
|
|
}
|