commit message

This commit is contained in:
martyTF 2026-04-11 17:30:53 +02:00
parent 270e1a0be4
commit 77afca4525
57 changed files with 971 additions and 423 deletions

View file

@ -0,0 +1,12 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./jellyfin.nix
];
}

View file

@ -11,64 +11,67 @@
enable = lib.mkEnableOption "enable jelyfin";
port = lib.mkOption {
default = 8096;
description = "set jellyfin port"
description = "set jellyfin port";
};
public = {
enable = lib.mkEnableOption "make jellyfin public";
subdomain = lib.mkOption {
default = "watch";
description = "set jellyfin subdomain";
};
public = lib.mkEnableOption "make jellyfin public";
subdomain = lib.mkOption {
default = "watch";
description = "set jellyfin subdomain";
};
};
jellyseer = {
enable = lib.mkEnableOption "enable jellyseer";
port = lib.mkOption {
default = 8097;
description = "set jellyseer port"
description = "set jellyseer port";
};
public = {
enable = lib.mkEnableOption "make jellyseer public";
subdomain = lib.mkOption {
default = "jellyseer";
description = "set jellyseer subdomain";
};
public = lib.mkEnableOption "make jellyseer public";
subdomain = lib.mkOption {
default = "jellyseer";
description = "set jellyseer subdomain";
};
};
};
config = {
environment.systemPackages = config.server.jellyfin.enable [
pkgs.jellyfin
pkgs.jellyfin-web
pkgs.jellyfin-ffmpeg
];
environment.systemPackages =
[ ]
++ (
if config.server.jellyfin.enable then
[
pkgs.jellyfin
pkgs.jellyfin-web
pkgs.jellyfin-ffmpeg
]
else
[ ]
);
services = {
jellyfin = lib.mkIf config.server.jellyfin.enable {
enable = true;
};
jellyseer = lib.mkIf config.server-jellyseer.enable {
seerr = lib.mkIf config.server.jellyseer.enable {
enable = true;
};
nginx.virtualHosts = {
"${config.server.jellyfin.public.subdomain}.${config.domain}" =
lib.mkIf config.server.jellyfin.public.enable
{
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${config.server.jellyfin.port}";
"${config.server.jellyfin.subdomain}.${config.networking.domain}" =
lib.mkIf config.server.jellyfin.public
{
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${config.server.jellyfin.port}";
};
};
};
"${config.server.jellyseer.public.subdomain}.${config.domain}" = lib.mkIf config.server.jellyfin.public.enable {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${config.server.jellyseer.port}";
"${config.server.jellyseer.subdomain}.${config.networking.domain}" =
lib.mkIf config.server.jellyfin.public
{
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${config.server.jellyseer.port}";
};
};
};
};
};
};
};
};