added extra jellyfin domain

This commit is contained in:
Leyla Becker 2025-03-04 21:39:12 -06:00
parent 34bc5b1933
commit 59bf355353
2 changed files with 19 additions and 3 deletions

View file

@ -97,6 +97,7 @@
jellyfin = {
enable = true;
subdomain = "media";
extraSubdomains = ["jellyfin"];
};
forgejo = {
enable = true;

View file

@ -16,15 +16,30 @@ in {
description = "subdomain of base domain that jellyfin will be hosted at";
default = "jellyfin";
};
extraSubdomains = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "ex subdomain of base domain that jellyfin will be hosted at";
default = [];
};
};
config = lib.mkIf config.host.jellyfin.enable (
lib.mkMerge [
{
services.jellyfin.enable = true;
host.reverse_proxy.subdomains.${config.host.jellyfin.subdomain} = {
host.reverse_proxy.subdomains = lib.mkMerge ([
{
${config.host.jellyfin.subdomain} = {
target = "http://localhost:${toString jellyfinPort}";
};
}
]
++ (builtins.map (subdomain: {
${subdomain} = {
target = "http://localhost:${toString jellyfinPort}";
};
})
config.host.jellyfin.extraSubdomains));
environment.systemPackages = [
pkgs.jellyfin
pkgs.jellyfin-web