summaryrefslogtreecommitdiff
path: root/hostnix
diff options
context:
space:
mode:
authorJoe Mou <dev@mou.fo>2024-10-13 11:29:24 -0400
committerJoe Mou <dev@mou.fo>2024-10-18 10:01:22 -0400
commit9f3989886fc46b1d799d7622917b4c3a8328a649 (patch)
tree0ce13cc4d5575572c63017c69f573054b2e3f970 /hostnix
parente26ee3b98cab9e1311fcc3803deff33dc3afc658 (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')
-rw-r--r--hostnix/elmo/configuration.nix1
-rw-r--r--hostnix/elmo/media.nix35
2 files changed, 36 insertions, 0 deletions
diff --git a/hostnix/elmo/configuration.nix b/hostnix/elmo/configuration.nix
index 056f2cf..e601b94 100644
--- a/hostnix/elmo/configuration.nix
+++ b/hostnix/elmo/configuration.nix
@@ -9,6 +9,7 @@
./git.nix
./hardware-configuration.nix
./home-assistant.nix
+ ./media.nix
./oidc.nix
./privacy-frontends.nix
./syncthing.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):
+# <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";
+ };
+}