{ config, lib, ... }: let inherit (config.networking) domain fqdn; inherit (import ../../data) homenet pubnet; in { services.jellyfin = { enable = true; }; services.caddy.virtualHosts = { "jf.${domain}" = { extraConfig = '' ${lib.optionalString (domain == homenet) '' tls { issuer internal { ca home } } ''} reverse_proxy localhost:8096 { health_uri /health health_body Healthy } ''; }; }; services.dnsmasq.settings.cname = [ "jf.${domain},${fqdn}" ]; fileSystems = lib.mkIf (domain == pubnet) { "/srv/video" = { device = "172.16.129.30:/nas/6567/video"; fsType = "nfs"; options = [ "nofail" ]; }; }; }