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

58 lines
1.4 KiB
Nix
Raw Normal View History

2024-09-14 19:36:59 +05:30
_:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat tlsDNSChallenge;
2024-10-11 22:22:23 +05:30
domainName = "watch.acomputer.lol";
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-09-14 19:36:59 +05:30
logFormat = logFormat "jellyfin.local.adtya.xyz";
2024-08-29 22:09:47 +05:30
extraConfig = ''
${tlsDNSChallenge}
2024-08-29 22:09:47 +05:30
reverse_proxy 127.0.0.1:8096
'';
};
"jellyfin.labs.adtya.xyz" = {
2024-09-14 19:36:59 +05:30
logFormat = logFormat "jellyfin.labs.adtya.xyz";
2024-08-29 22:09:47 +05:30
extraConfig = ''
${tlsDNSChallenge}
2024-08-29 22:09:47 +05:30
reverse_proxy 127.0.0.1:8096
'';
};
2024-10-11 22:22:23 +05:30
"${domainName}" = {
logFormat = logFormat domainName;
extraConfig = ''
reverse_proxy 127.0.0.1:8096
'';
};
2024-08-29 22:09:47 +05:30
};
};
2024-10-11 22:22:23 +05:30
frp.settings.proxies = [
{
name = "http.${domainName}";
type = "http";
customDomains = [ domainName ];
localPort = 80;
transport.useCompression = true;
}
{
name = "https.${domainName}";
type = "https";
customDomains = [ domainName ];
localPort = 443;
transport.useCompression = true;
}
];
2024-08-29 22:09:47 +05:30
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" ];
}