40 lines
779 B
Nix
40 lines
779 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.sydnix.deertopia.jellyfin;
|
|
in {
|
|
options = {
|
|
sydnix.deertopia.jellyfin = {
|
|
enable = mkEnableOption "Deertopia's Jellyfin media server";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
sydnix.impermanence =
|
|
let jcfg = config.services.jellyfin;
|
|
in {
|
|
directories = [
|
|
jcfg.dataDir
|
|
jcfg.configDir
|
|
];
|
|
cache.directories = [
|
|
jcfg.cacheDir
|
|
];
|
|
};
|
|
|
|
services.jellyfin = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
|
|
sydnix.deertopia.nginx.vhosts."watch".vhost = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:8096"; # Uses default port.
|
|
};
|
|
};
|
|
};
|
|
}
|