VEGAS: add Warehouse
This commit is contained in:
parent
ed80609997
commit
9b8f43fa28
2 changed files with 46 additions and 0 deletions
45
hosts/VEGAS/services/warehouse/default.nix
Normal file
45
hosts/VEGAS/services/warehouse/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ config, lib, pkgs, tools, ... }:
|
||||||
|
with tools.nginx;
|
||||||
|
{
|
||||||
|
# TODO: not a whole lot to configure, maybe add some autoconfig stuff
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.jellyfin.override {
|
||||||
|
ffmpeg = pkgs.ffmpeg.override {
|
||||||
|
libmfxSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts."warehouse.${tools.meta.domain}" = lib.mkMerge [
|
||||||
|
(vhosts.proxy "http://127.0.0.1:8096")
|
||||||
|
{
|
||||||
|
locations."/".extraConfig = ''
|
||||||
|
proxy_buffering off;
|
||||||
|
'';
|
||||||
|
locations."/socket" = {
|
||||||
|
inherit (config.services.nginx.virtualHosts."warehouse.${tools.meta.domain}".locations."/") proxyPass;
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
# TODO: video cache
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = [ pkgs.intel-media-driver ];
|
||||||
|
};
|
||||||
|
systemd.services.jellyfin.serviceConfig = {
|
||||||
|
# allow access to GPUs for hardware transcoding
|
||||||
|
DeviceAllow = lib.mkForce "char-drm";
|
||||||
|
BindPaths = lib.mkForce "/dev/dri";
|
||||||
|
# to allow restarting from web ui
|
||||||
|
Restart = lib.mkForce "always";
|
||||||
|
|
||||||
|
Slice = "mediaplayback.slice";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/animus/media" = {
|
||||||
|
device = "10.15.0.2:/mnt/storage/media/media";
|
||||||
|
fsType = "nfs4";
|
||||||
|
};
|
||||||
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
./services/jokes
|
./services/jokes
|
||||||
./services/nfs
|
./services/nfs
|
||||||
./services/mail
|
./services/mail
|
||||||
|
./services/warehouse
|
||||||
]
|
]
|
||||||
# TODO: fix users
|
# TODO: fix users
|
||||||
# ++ (import ../../users "server").groups.admin
|
# ++ (import ../../users "server").groups.admin
|
||||||
|
|
Loading…
Reference in a new issue