diff --git a/modules/homelab/default.nix b/modules/homelab/default.nix index e3cb769..0f53399 100644 --- a/modules/homelab/default.nix +++ b/modules/homelab/default.nix @@ -7,6 +7,7 @@ ./arr.nix ./flame.nix ./home-assistant.nix + ./jellyfin.nix ./nextcloud.nix ./nginx.nix ./plex.nix diff --git a/modules/homelab/jellyfin.nix b/modules/homelab/jellyfin.nix new file mode 100644 index 0000000..88fd559 --- /dev/null +++ b/modules/homelab/jellyfin.nix @@ -0,0 +1,27 @@ +{ + config, + lib, + ... +}: +lib.mkIf config.fireproof.homelab.enable (let + domain = "jellyfin.nickolaj.com"; +in { + services.restic.backups.homelab.paths = [config.services.jellyfin.dataDir]; + + services.nginx.virtualHosts."${domain}" = { + forceSSL = true; + enableACME = true; + http2 = true; + locations."/" = { + proxyWebsockets = true; + proxyPass = "http://localhost:8096/"; + }; + }; + + services.jellyfin = { + enable = true; + openFirewall = true; + user = "media"; + group = "media"; + }; +})