added extra jellyfin domain
This commit is contained in:
parent
34bc5b1933
commit
59bf355353
|
@ -97,6 +97,7 @@
|
||||||
jellyfin = {
|
jellyfin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
subdomain = "media";
|
subdomain = "media";
|
||||||
|
extraSubdomains = ["jellyfin"];
|
||||||
};
|
};
|
||||||
forgejo = {
|
forgejo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -16,15 +16,30 @@ in {
|
||||||
description = "subdomain of base domain that jellyfin will be hosted at";
|
description = "subdomain of base domain that jellyfin will be hosted at";
|
||||||
default = "jellyfin";
|
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 (
|
config = lib.mkIf config.host.jellyfin.enable (
|
||||||
lib.mkMerge [
|
lib.mkMerge [
|
||||||
{
|
{
|
||||||
services.jellyfin.enable = true;
|
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}";
|
target = "http://localhost:${toString jellyfinPort}";
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ (builtins.map (subdomain: {
|
||||||
|
${subdomain} = {
|
||||||
|
target = "http://localhost:${toString jellyfinPort}";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
config.host.jellyfin.extraSubdomains));
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.jellyfin
|
pkgs.jellyfin
|
||||||
pkgs.jellyfin-web
|
pkgs.jellyfin-web
|
||||||
|
|
Loading…
Reference in a new issue