Add https/tls support to traefik sites
This commit is contained in:
parent
ee34f667b9
commit
816b839ab4
|
@ -7,7 +7,6 @@
|
|||
./hardware/bluetooth.nix
|
||||
./locales/en_GB.nix
|
||||
./desktop/plasma.nix
|
||||
./desktop/hyprland.nix
|
||||
./desktop/steam.nix
|
||||
./syncthing/Vanguard.nix
|
||||
./server/adguardhome.nix
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
routers.adguard = { rule = "Host(`guard.xenia.me.uk`)"; service = "adguard-webinterface"; };
|
||||
routers.adguard = { rule = "Host(`guard.xenia.me.uk`)"; service = "adguard-webinterface"; tls = { certResolver = "default"; }; };
|
||||
services.adguard-webinterface.loadBalancer.servers = [{ url = "http://localhost:3001"; }];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
services.gitea.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
routers.gitea = { rule = "Host(`git.xenia.me.uk`)"; service = "gitea-websecure"; };
|
||||
routers.gitea = { rule = "Host(`git.xenia.me.uk`)"; service = "gitea-websecure"; tls = { certResolver = "default"; }; };
|
||||
services.gitea-websecure.loadBalancer.servers = [{ url = "http://localhost:3000"; }];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,9 +6,22 @@
|
|||
api = { insecure = true; };
|
||||
entryPoints = {
|
||||
http = { address = ":80"; };
|
||||
web = { address = ":30000"; };
|
||||
https = { address = ":443"; };
|
||||
};
|
||||
certificatesResolvers = {
|
||||
default = {
|
||||
acme = {
|
||||
email = "evie@xenia.me.uk";
|
||||
storage = "/var/lib/traefik/acme.json";
|
||||
httpChallenge = { entryPoint = "http"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
dynamicConfigOptions.http = {
|
||||
routers.traefik = { rule = "Host(`traefik.xenia.me.uk`)"; service = "traefik-webinterface"; tls = { certResolver = "default"; }; };
|
||||
services.traefik-webinterface.loadBalancer.servers = [{ url = "http://localhost:8080"; }];
|
||||
};
|
||||
};
|
||||
networking.firewall = { enable = true; allowedTCPPorts = [ 80 443 30000 ]; };
|
||||
networking.firewall = { enable = true; allowedTCPPorts = [ 80 443 8080 ]; };
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue