mirror of
https://git.gay/xqtc/nixos-config
synced 2024-11-22 21:40:31 +01:00
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
|
{
|
||
|
config,
|
||
|
pkgs,
|
||
|
lib,
|
||
|
...
|
||
|
}: let
|
||
|
proxyConfig = ''
|
||
|
|
||
|
proxy_set_header Host $host;
|
||
|
proxy_set_header X-Real-IP $remote_addr;
|
||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
||
|
proxy_set_header X-Forwarded-Host $http_host;
|
||
|
'';
|
||
|
in {
|
||
|
environment.systemPackages = with pkgs; [
|
||
|
jellyfin
|
||
|
jellyfin-web
|
||
|
jellyfin-ffmpeg
|
||
|
];
|
||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||
|
intel-vaapi-driver =
|
||
|
pkgs.intel-vaapi-driver.override {enableHybridCodec = true;};
|
||
|
};
|
||
|
hardware.opengl = {
|
||
|
enable = true;
|
||
|
extraPackages = with pkgs; [
|
||
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||
|
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||
|
vaapiVdpau
|
||
|
libvdpau-va-gl
|
||
|
];
|
||
|
};
|
||
|
environment.sessionVariables = {
|
||
|
LIBVA_DRIVER_NAME = "iHD";
|
||
|
}; # Force intel-media-driver
|
||
|
services.jellyfin.enable = true;
|
||
|
# services.jellyfin.openFirewall = true;
|
||
|
services.jellyfin.user = "xqtc";
|
||
|
}
|