summaryrefslogtreecommitdiff
path: root/hostnix/elmo/media.nix
blob: 7ef80b2a19a8c212ddc3d04b5ac459bfa4516553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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";
  };
}