From 426a2d581489eecba9ab1ac2615c6730f377ae9d Mon Sep 17 00:00:00 2001 From: Tyler Beckman Date: Mon, 6 Jan 2025 01:13:10 -0700 Subject: [PATCH] Add jellyseerr and fix DNS in containers --- .../config/services/caddy/Caddyfile | 5 ++++ .../laptop-server/config/services/default.nix | 1 + .../config/services/jellyfin/default.nix | 1 + .../config/services/jellyseerr/default.nix | 24 +++++++++++++++++++ .../config/services/networking.nix | 4 +++- 5 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 hosts/laptop-server/config/services/jellyseerr/default.nix diff --git a/hosts/laptop-server/config/services/caddy/Caddyfile b/hosts/laptop-server/config/services/caddy/Caddyfile index 7e241e1..04708c4 100644 --- a/hosts/laptop-server/config/services/caddy/Caddyfile +++ b/hosts/laptop-server/config/services/caddy/Caddyfile @@ -23,12 +23,17 @@ https://*.m.myriation.xyz { # Configure all service matchers @jellyfin host jellyfin.m.myriation.xyz + @jellyseerr host jellyseerr.m.myriation.xyz # Handle all services handle @jellyfin { reverse_proxy jellyfin.containers:8096 } + handle @jellyseerr { + reverse_proxy jellyseerr.containers:5055 + } + # Handle all unmatched requests as a 404 handle { error "Not Found" 404 diff --git a/hosts/laptop-server/config/services/default.nix b/hosts/laptop-server/config/services/default.nix index f442884..eee853b 100644 --- a/hosts/laptop-server/config/services/default.nix +++ b/hosts/laptop-server/config/services/default.nix @@ -5,5 +5,6 @@ # Individual services ./caddy ./jellyfin + ./jellyseerr ]; } diff --git a/hosts/laptop-server/config/services/jellyfin/default.nix b/hosts/laptop-server/config/services/jellyfin/default.nix index 4d13301..04cd169 100644 --- a/hosts/laptop-server/config/services/jellyfin/default.nix +++ b/hosts/laptop-server/config/services/jellyfin/default.nix @@ -11,6 +11,7 @@ # Firewall on the host system is enough + this firewall seems to break networking networking.firewall.enable = false; + networking.useHostResolvConf = true; }; autoStart = true; diff --git a/hosts/laptop-server/config/services/jellyseerr/default.nix b/hosts/laptop-server/config/services/jellyseerr/default.nix new file mode 100644 index 0000000..f16624b --- /dev/null +++ b/hosts/laptop-server/config/services/jellyseerr/default.nix @@ -0,0 +1,24 @@ +{ ... }: +{ + containers.jellyseerr = { + config = { pkgs, ... }: { + system.stateVersion = "25.11"; + + services.jellyseerr = { + enable = true; + package = pkgs.jellyseerr; + }; + + # Firewall on the host system is enough + this firewall seems to break networking + networking.firewall.enable = false; + networking.useHostResolvConf = true; + }; + autoStart = true; + }; + + networking = { + firewall.trustedInterfaces = [ "ve-jellyseerr" ]; + nat.internalInterfaces = [ "ve-jellyseerr" ]; + networkmanager.unmanaged = [ "interface-name:ve-jellyseerr" ]; + }; +} diff --git a/hosts/laptop-server/config/services/networking.nix b/hosts/laptop-server/config/services/networking.nix index 57dff59..996d63a 100644 --- a/hosts/laptop-server/config/services/networking.nix +++ b/hosts/laptop-server/config/services/networking.nix @@ -3,7 +3,9 @@ let services = { jellyfin = { hostByte = 2; - ports = []; + }; + jellyseerr = { + hostByte = 3; }; }; in {