hai! wo? ich bin ein fisch.
This commit is contained in:
parent
eaea15fa3a
commit
ef91935d4b
14 changed files with 196 additions and 5 deletions
75
modules/server/media/jellyfin.nix
Normal file
75
modules/server/media/jellyfin.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options.server = {
|
||||
jellyfin = {
|
||||
enable = lib.mkEnableOption "enable jelyfin";
|
||||
port = lib.mkOption {
|
||||
default = 8096;
|
||||
description = "set jellyfin port"
|
||||
};
|
||||
public = {
|
||||
enable = 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"
|
||||
};
|
||||
public = {
|
||||
enable = 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
|
||||
];
|
||||
services = {
|
||||
jellyfin = lib.mkIf config.server.jellyfin.enable {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
jellyseer = 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.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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue