diff --git a/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix b/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix index 18f20c0..ad9fe0e 100644 --- a/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix +++ b/nixos/boxes/colony/vms/shill/containers/jackflix/default.nix @@ -74,6 +74,8 @@ jackett.enable = true; radarr.enable = true; + + jellyfin.enable = true; }; }; }; diff --git a/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix b/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix index c764a0e..7e726b7 100644 --- a/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix +++ b/nixos/boxes/colony/vms/shill/containers/middleman/vhosts.nix @@ -191,6 +191,30 @@ in } (ssoServer "generic") ]; + + "jackflix-test.${lib.my.pubDomain}" = + let + upstream = "http://jackflix-ctr.${config.networking.domain}:8096"; + in + { + extraConfig = '' + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-XSS-Protection "1; mode=block"; + add_header X-Content-Type-Options "nosniff"; + ''; + locations = { + "/".proxyPass = upstream; + + "= /".return = "302 https://$host/web/"; + "= /web/".proxyPass = "${upstream}/web/index.html"; + + "/socket" = { + proxyPass = upstream; + proxyWebsockets = true; + }; + }; + useACMEHost = lib.my.pubDomain; + }; }; in mkMerge [ diff --git a/nixos/modules/tmproot.nix b/nixos/modules/tmproot.nix index cd21814..b475323 100644 --- a/nixos/modules/tmproot.nix +++ b/nixos/modules/tmproot.nix @@ -268,6 +268,18 @@ in } ]; }) + (mkIf config.services.jellyfin.enable { + my.tmproot.persistence.config.directories = [ + { + directory = "/var/lib/jellyfin"; + inherit (config.services.jellyfin) user group; + } + { + directory = "/var/cache/jellyfin"; + inherit (config.services.jellyfin) user group; + } + ]; + }) (persistSimpleSvc "transmission") (persistSimpleSvc "jackett") (persistSimpleSvc "radarr")