diff --git a/core/hosts/hades/network.nix b/core/hosts/hades/network.nix index ae77755..03d9632 100755 --- a/core/hosts/hades/network.nix +++ b/core/hosts/hades/network.nix @@ -19,12 +19,15 @@ allowedTCPPorts = [ 2234 # soulseek/nicotine-plus 8384 # syncthing + 8096 # jellyfin http + 8920 # jellyfin https ]; ## Specific UDP ports to be opened allowedUDPPorts = [ 2234 # soulseek/nicotine-plus 8834 # syncthing + 7359 # jellyfin - client discovery ]; ## Ranges for TCP and UDP ports to be opened diff --git a/core/jellyfin.nix b/core/jellyfin.nix index 280bc52..9771e3c 100755 --- a/core/jellyfin.nix +++ b/core/jellyfin.nix @@ -1,4 +1,4 @@ -{ inputs, outputs, lib, config, pkgs, ... }: +{ inputs, outputs, lib, config, pkgs, primaryUser, ... }: { @@ -13,4 +13,39 @@ jellyfin-ffmpeg ]; + services = { + jellyfin = { + enable = true; + openFirewall = true; + user = "${primaryUser}"; + }; + }; + + #nixpkgs.config.packageOverrides = pkgs: { # enable vaapi on OS-level + #vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; + #}; + + #systemd.services.jellyfin.environment.LIBVA_DRIVER_NAME = "iHD"; # or i965, see below + #environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; # ditto + + hardware.graphics = { + #enable = true; + extraPackages = with pkgs; [ + #intel-ocl # generic OpenCL support, for all processors + # For newer processors (Broadwell and higher, ca. 2014), use this paired with `LIBVA_DRIVER_NAME=iHD`: + #intel-media-driver + # ... while for older processors, use these paired with `LIBVA_DRIVER_NAME=i965`: + #intel-vaapi-driver + #libva-vdpau-driver # aka vaapiVdpau + # In addition, for newer processors (13th gen and higher), add this as well: + #intel-compute-runtime + # ... while for older processors, add this (https://github.com/NixOS/nixpkgs/issues/356535): + #intel-compute-runtime-legacy1 + # In addition once more, for newer processors (11th gen or newer), add this: + #vpl-gpu-rt + # ... while for older processors, add this: + #intel-media-sdk # (note it's been deprecated since NixOS 25.11 and may not build anymore nowadays) + ]; + }; + }