diff --git a/modules/server/media/jellyfin.nix b/modules/server/media/jellyfin.nix new file mode 100644 index 00000000..7d69fb84 --- /dev/null +++ b/modules/server/media/jellyfin.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, ... }: +with lib; +let cfg = config.void.server.media.jellyfin; +in { + options.void.server.media.jellyfin = { enable = mkEnableOption false; }; + + config = mkIf cfg.enable { + users.groups.media = { }; + + services = { + jellyfin = { + enable = true; + group = "media"; + }; + + nginx.virtualHosts = { + "jellyfin.sako.box" = { + forceSSL = true; + sslCertificate = "/srv/secrets/certs/sako.box.pem"; + sslCertificateKey = "/srv/secrets/certs/sako.box-key.pem"; + locations."/" = { proxyPass = "http://localhost:8096"; }; + }; + }; + }; + + }; +}