servarr: enabled jellyseerr service

This commit is contained in:
Tigor Hutasuhut 2024-06-26 16:34:41 +07:00
parent 1eb35f34a1
commit a772664b8e
2 changed files with 16 additions and 2 deletions

View file

@ -1,6 +1,6 @@
{ lib, ... }: { config, lib, ... }:
let let
inherit (lib) mkEnableOption; inherit (lib) mkEnableOption mkOption types;
in in
{ {
options.profile.services = { options.profile.services = {
@ -14,6 +14,10 @@ in
openvpn.enable = mkEnableOption "openvpn"; openvpn.enable = mkEnableOption "openvpn";
stubby.enable = mkEnableOption "stubby"; stubby.enable = mkEnableOption "stubby";
jellyfin.enable = mkEnableOption "jellyfin"; jellyfin.enable = mkEnableOption "jellyfin";
jellyfin.jellyseerr.enable = mkOption {
type = types.bool;
default = config.profile.services.jellyfin.enable;
};
rust-motd.enable = mkEnableOption "rust-motd"; rust-motd.enable = mkEnableOption "rust-motd";
wireguard.enable = mkEnableOption "wireguard"; wireguard.enable = mkEnableOption "wireguard";
photoprism.enable = mkEnableOption "photoprism"; photoprism.enable = mkEnableOption "photoprism";

View file

@ -3,6 +3,7 @@ let
cfg = config.profile.services.jellyfin; cfg = config.profile.services.jellyfin;
dataDir = "/nas/mediaserver/jellyfin"; dataDir = "/nas/mediaserver/jellyfin";
domain = "jellyfin.tigor.web.id"; domain = "jellyfin.tigor.web.id";
domain-jellyseerr = "media.tigor.web.id";
inherit (lib) mkIf; inherit (lib) mkIf;
username = config.profile.user.name; username = config.profile.user.name;
in in
@ -17,9 +18,18 @@ in
services.caddy.virtualHosts.${domain}.extraConfig = '' services.caddy.virtualHosts.${domain}.extraConfig = ''
reverse_proxy 0.0.0.0:8096 reverse_proxy 0.0.0.0:8096
''; '';
services.caddy.virtualHosts.${domain-jellyseerr} = mkIf cfg.jellyseerr.enable {
extraConfig = ''
reverse_proxy 0.0.0.0:5055
'';
};
services.jellyfin = { services.jellyfin = {
enable = true; enable = true;
inherit dataDir; inherit dataDir;
}; };
services.jellyseerr = mkIf cfg.jellyseerr.enable {
enable = true;
};
}; };
} }