From 9f3989886fc46b1d799d7622917b4c3a8328a649 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Sun, 13 Oct 2024 11:29:24 -0400 Subject: Jellyfin media server w/ VA-API hardware acceleration Jellyfin uses its own authentication; it's probably not worthwhile to try to consolidate with SSO (and may break Jellyfin clients). We don't bother to allow UDP for DLNA nor Jellyfin auto detection. --- hostnix/elmo/media.nix | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 hostnix/elmo/media.nix (limited to 'hostnix/elmo/media.nix') diff --git a/hostnix/elmo/media.nix b/hostnix/elmo/media.nix new file mode 100644 index 0000000..7ef80b2 --- /dev/null +++ b/hostnix/elmo/media.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: + +# https://nixos.wiki/wiki/Jellyfin +# +# Manual configuration: +# - Create joe and guest users +# - Administration: Dashboard > Advanced: Networking +# - Bind to local network address: ::1 +# - Enable IPv6 +# - Add line to /var/lib/jellyfin/config/network.xml (see +# https://github.com/jellyfin/jellyfin/issues/6940): +# false + +{ + nixpkgs.config.packageOverrides = pkgs: { + # Apparently adds some hardware acceleration. + intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; }; + }; + + hardware.opengl = { + enable = true; + # Haswell seems too old to be supported by intel-media-driver (iHD). While + # QSV is apparently implemented for intel-vaapi-driver (i965) by + # intel-media-sdk, Jellyfin seems to only support QSV on iHD. + extraPackages = with pkgs; [ intel-vaapi-driver ]; + }; + + services.jellyfin.enable = true; + + services.nginx.virtualHosts."jf.mou.fo" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://[::1]:8096"; + }; +} -- cgit v1.3.1