Opened Firewall, Added Dashboard-stuff
Some checks failed
/ Check NixOS Configuration (push) Has been cancelled
Some checks failed
/ Check NixOS Configuration (push) Has been cancelled
This commit is contained in:
parent
e8e469f2a9
commit
5be4192143
1 changed files with 14 additions and 12 deletions
|
@ -11,25 +11,27 @@ let
|
|||
in
|
||||
{
|
||||
config = lib.mkIf (cfg.enable && cfg.useTraefik.enable) {
|
||||
|
||||
# Default Config
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
staticConfigOptions = {
|
||||
entryPoints.web.address = ":80";
|
||||
entryPoints.websecure.address = ":443";
|
||||
api = {
|
||||
insecure = true;
|
||||
};
|
||||
};
|
||||
dynamicConfigOptions = {
|
||||
# http.routers.dashboard.entrypoints = "websecure";
|
||||
# http.routers.dashboard.tls = true;
|
||||
# http.routers.dashboard.rule = "Host(`traefik.localhost`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))";
|
||||
# http.routers.dashboard.service = "api@internal";
|
||||
# http.routers.dashboard.middlewares = "auth";
|
||||
# http.middlewares.auth.basicauth.users = "master:\$\$2y\$\$05\$\$YWM0ZknINeHpJsNqqsd91eF/yl.S8t12TPQsDmf92glrjGW9Y1RvO";
|
||||
};
|
||||
};
|
||||
networking.firewall.interfaces.eth0.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
# Enable Secure Dashboard
|
||||
services.traefik.staticConfigOptions.api = {};
|
||||
services.traefik.dynamicConfigOptions = {
|
||||
http.routers.dashboard.entrypoints = "websecure";
|
||||
http.routers.dashboard.tls = true;
|
||||
http.routers.dashboard.rule = "Host(`traefik.localhost`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))";
|
||||
http.routers.dashboard.service = "api@internal";
|
||||
http.routers.dashboard.middlewares = "auth";
|
||||
http.middlewares.auth.basicauth.users = "master:\$\$2y\$\$05\$\$JwzsNHz7CMJh0RU1eMe3AOfY5H30Qr1Q/glS1r/qEHCNpo5LvWnRW";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue