This commit is contained in:
tulg 2026-04-25 19:45:44 +03:00
parent 245890d044
commit a52a5741d3

View file

@ -1,56 +1,59 @@
services.traefik = {
services.traefik = { enable = true;
enable = true;
staticConfigOptions = { staticConfigOptions = {
entryPoints = { entryPoints = {
web = { web = {
address = ":80"; address = ":80";
asDefault = true; http.redirections.entrypoint = {
http.redirections.entrypoint = { to = "websecure";
to = "websecure"; scheme = "https";
scheme = "https"; };
};
websecure = {
address = ":443";
http.tls.certResolver = "letsencrypt";
};
};
log = {
level = "INFO";
filePath = "${config.services.traefik.dataDir}/traefik.log";
format = "json";
};
certificatesResolvers.letsencrypt.acme = {
email = "tulg@protonmail.ch";
storage = "${config.services.traefik.dataDir}/acme.json";
httpChallenge.entryPoint = "web";
};
api.dashboard = true;
};
dynamicConfigOptions = {
http = {
routers = {
xray = {
rule = "Host(`v2.kittykat.poggerer.xyz`)";
entryPoints = [ "websecure" ];
service = "xray";
tls = {
certResolver = "letsencrypt";
}; };
}; };
};
websecure = { services = {
address = ":443"; xray = {
asDefault = true; loadBalancer = {
http.tls.certResolver = "letsencrypt"; servers = [
{ url = "http://127.0.0.1:2053"; }
];
};
}; };
}; };
log = {
level = "INFO";
filePath = "${config.services.traefik.dataDir}/traefik.log";
format = "json";
};
certificatesResolvers.letsencrypt.acme = {
email = "tulg@protonmail.ch";
storage = "${config.services.traefik.dataDir}/acme.json";
httpChallenge.entryPoint = "web";
};
api.dashboard = true;
# Access the Traefik dashboard on <Traefik IP>:8080 of your server
# api.insecure = true;
}; };
dynamicConfigOptions = {
http = {
routers.xray = {
rule = "Host(`v2.kittykat.poggerer.xyz`)";
entryPoints = [ "websecure" ];
service = "xray";
tls.certResolver = "letsencrypt";
};
services.myapp.loadBalancer.servers = [
{ url = "http://127.0.0.1:2053"; }
];
}; };
};
};