feat: Jellyfin media server
This commit is contained in:
39
modules/nixos/deertopia/jellyfin.nix
Normal file
39
modules/nixos/deertopia/jellyfin.nix
Normal file
@@ -0,0 +1,39 @@
|
||||
{ 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.
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user