feat(jellyfin): adding to tnet

This commit is contained in:
2025-10-05 19:10:43 +02:00
parent 93f227ba7e
commit 3306598f8a
5 changed files with 14 additions and 7 deletions

View File

@@ -99,7 +99,7 @@ in {
middlewares = { middlewares = {
authentik = { authentik = {
forwardAuth = { forwardAuth = {
tls.insecureSkipVerify = true; # tls.insecureSkipVerify = true;
address = "https://localhost:9443/outpost.goauthentik.io/auth/traefik"; address = "https://localhost:9443/outpost.goauthentik.io/auth/traefik";
trustForwardHeader = true; trustForwardHeader = true;
authResponseHeaders = [ authResponseHeaders = [
@@ -130,7 +130,7 @@ in {
routers = { routers = {
auth = { auth = {
entryPoints = ["websecure"]; entryPoints = ["websecure"];
rule = "Host(`${cfg.url}`) || HostRegexp(`{subdomain:[a-z0-9]+}.${srv.www.url}`) && PathPrefix(`/outpost.goauthentik.io/`)"; rule = "Host(`${cfg.url}`) && PathPrefix(`/outpost.goauthentik.io/`)";
service = "auth"; service = "auth";
tls.certResolver = "letsencrypt"; tls.certResolver = "letsencrypt";
}; };

View File

@@ -18,7 +18,7 @@ in {
}; };
url = lib.mkOption { url = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "sobotka.taila7448a.ts.net"; default = "fin.${srv.tailscale.url}";
}; };
homepage.name = lib.mkOption { homepage.name = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@@ -49,13 +49,13 @@ in {
services.traefik = { services.traefik = {
dynamicConfigOptions = { dynamicConfigOptions = {
http = { http = {
services.${unit}.loadBalancer.servers = [{url = "http://127.0.0.1:8096";}]; services.${unit}.loadBalancer.servers = [{url = "http://localhost:8096";}];
routers = { routers = {
jellyfinRouter = { jellyfinRouter = {
entryPoints = ["websecure"]; entryPoints = ["websecure"];
rule = "Host(`${cfg.url}`)"; rule = "Host(`${cfg.url}`)";
service = "${unit}"; service = "${unit}";
tls.certResolver = "vpn"; tls.certResolver = "letsencrypt";
}; };
}; };
}; };

View File

@@ -9,6 +9,10 @@ with lib; let
in { in {
options.server.tailscale = { options.server.tailscale = {
enable = mkEnableOption "Enable tailscale server configuration"; enable = mkEnableOption "Enable tailscale server configuration";
url = lib.mkOption {
type = lib.types.str;
default = "ts.cnst.dev";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@@ -21,7 +25,6 @@ in {
authKeyFile = config.age.secrets.sobotkaTsAuth.path; authKeyFile = config.age.secrets.sobotkaTsAuth.path;
extraSetFlags = [ extraSetFlags = [
"--advertise-exit-node" "--advertise-exit-node"
"--advertise-routes=192.168.88.0/24"
]; ];
}; };
}; };

View File

@@ -23,7 +23,7 @@ in {
age.secrets.traefikEnv = { age.secrets.traefikEnv = {
file = "${self}/secrets/traefikEnv.age"; file = "${self}/secrets/traefikEnv.age";
mode = "640"; mode = "640";
owner = "root"; owner = "traefik";
group = "traefik"; group = "traefik";
}; };
@@ -89,6 +89,10 @@ in {
main = "cnix.dev"; main = "cnix.dev";
sans = ["*.cnix.dev"]; sans = ["*.cnix.dev"];
} }
{
main = "ts.cnst.dev";
sans = ["*ts.cnst.dev"];
}
]; ];
}; };
}; };

Binary file not shown.