pek0/jellyfin: expose on jellyfin.ny4.dev

This commit is contained in:
Guanran Wang 2024-11-10 16:55:10 +08:00
parent b84a8db5c0
commit 87f542fb92
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
4 changed files with 21 additions and 1 deletions

View file

@ -61,6 +61,7 @@
credentialsFile = config.sops.secrets."cloudflared/secret".path;
default = "http_status:404";
ingress = lib.genAttrs [
"jellyfin.ny4.dev"
"mastodon.ny4.dev"
"matrix.ny4.dev"
"pek0.ny4.dev"

View file

@ -1,6 +1,16 @@
{ lib, ... }:
{
services.jellyfin = {
enable = true;
openFirewall = true;
};
services.caddy.settings.apps.http.servers.srv0.routes = lib.singleton {
match = lib.singleton { host = [ "jellyfin.ny4.dev" ]; };
handle = lib.singleton {
handler = "reverse_proxy";
headers.request.set."X-Forwarded-Proto" = [ "https" ];
upstreams = lib.singleton { dial = "127.0.0.1:8096"; };
};
};
}

View file

@ -223,6 +223,15 @@ resource "cloudflare_record" "grafana" {
zone_id = local.cloudflare_zone_id
}
resource "cloudflare_record" "jellyfin" {
content = "pek0.ny4.dev"
name = "jellyfin"
proxied = true
ttl = 1
type = "CNAME"
zone_id = local.cloudflare_zone_id
}
resource "cloudflare_record" "terraform_managed_resource_856ec5e567960bf847db2e814f18168b" {
content = "google-site-verification=wBL5EFnbnt9lt2j_BtcwlXTaBFlFT563mC1MkCscnR8"
name = "ny4.dev"

File diff suppressed because one or more lines are too long