configuration.nix/hosts/layne/services/apps/jellyfin.nix

35 lines
805 B
Nix
Raw Normal View History

2024-09-14 19:36:59 +05:30
_:
let
2024-10-27 23:09:50 +05:30
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsAcmeDnsChallenge;
2024-09-14 19:36:59 +05:30
in
{
2024-08-29 22:09:47 +05:30
services = {
caddy = {
virtualHosts = {
"jellyfin.local.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-29 22:09:47 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-29 22:09:47 +05:30
reverse_proxy 127.0.0.1:8096
'';
};
"jellyfin.labs.adtya.xyz" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-08-29 22:09:47 +05:30
extraConfig = ''
2024-10-27 23:09:50 +05:30
${tlsAcmeDnsChallenge}
2024-08-29 22:09:47 +05:30
reverse_proxy 127.0.0.1:8096
'';
};
};
};
jellyfin = {
enable = true;
user = "mediaserver";
group = "mediaserver";
2024-08-29 22:09:47 +05:30
dataDir = "/mnt/data/Jellyfin";
openFirewall = true;
};
};
systemd.services.jellyfin.unitConfig.RequiresMountsFor = [ "/mnt/data" ];
}