diff options
| author | Joe Mou <dev@mou.fo> | 2024-10-13 11:29:24 -0400 |
|---|---|---|
| committer | Joe Mou <dev@mou.fo> | 2024-10-18 10:01:22 -0400 |
| commit | 9f3989886fc46b1d799d7622917b4c3a8328a649 (patch) | |
| tree | 0ce13cc4d5575572c63017c69f573054b2e3f970 /hostnix/elmo/media.nix | |
| parent | e26ee3b98cab9e1311fcc3803deff33dc3afc658 (diff) | |
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.
Diffstat (limited to 'hostnix/elmo/media.nix')
| -rw-r--r-- | hostnix/elmo/media.nix | 35 |
1 files changed, 35 insertions, 0 deletions
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): +# <DetectNetworkChange>false</DetectNetworkChange> + +{ + 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"; + }; +} |
