nixos/jackflix: Add Jellyseerr

This commit is contained in:
Jack O'Sullivan 2023-11-13 20:49:59 +00:00
parent fe4a24ab17
commit ddc2ed2919
4 changed files with 37 additions and 3 deletions

View File

@ -4,10 +4,12 @@
uids = { uids = {
matrix-syncv3 = 400; matrix-syncv3 = 400;
gitea-runner = 401; gitea-runner = 401;
jellyseerr = 402;
}; };
gids = { gids = {
matrix-syncv3 = 400; matrix-syncv3 = 400;
gitea-runner = 401; gitea-runner = 401;
jellyseerr = 402;
}; };
}; };

View File

@ -22,7 +22,7 @@ in
configuration = { lib, pkgs, config, ... }: configuration = { lib, pkgs, config, ... }:
let let
inherit (lib); inherit (lib) mkForce;
in in
{ {
imports = [ ./networking.nix ]; imports = [ ./networking.nix ];
@ -37,14 +37,22 @@ in
}; };
}; };
users = { users = with lib.my.c.ids; {
groups.media.gid = 2000;
users = { users = {
"${config.my.user.config.name}".extraGroups = [ "media" ]; "${config.my.user.config.name}".extraGroups = [ "media" ];
transmission.extraGroups = [ "media" ]; transmission.extraGroups = [ "media" ];
radarr.extraGroups = [ "media" ]; radarr.extraGroups = [ "media" ];
sonarr.extraGroups = [ "media" ]; sonarr.extraGroups = [ "media" ];
jellyseerr = {
isSystemUser = true;
uid = uids.jellyseerr;
group = "jellyseerr";
};
};
groups = {
media.gid = 2000;
jellyseerr.gid = gids.jellyseerr;
}; };
}; };
@ -55,6 +63,12 @@ in
radarr.serviceConfig.UMask = "0002"; radarr.serviceConfig.UMask = "0002";
sonarr.serviceConfig.UMask = "0002"; sonarr.serviceConfig.UMask = "0002";
jellyseerr.serviceConfig = {
# Needs to be able to read its secrets
DynamicUser = mkForce false;
User = "jellyseerr";
Group = "jellyseerr";
};
# https://github.com/NixOS/nixpkgs/issues/258793#issuecomment-1748168206 # https://github.com/NixOS/nixpkgs/issues/258793#issuecomment-1748168206
transmission.serviceConfig = { transmission.serviceConfig = {
@ -96,6 +110,10 @@ in
jackett.enable = true; jackett.enable = true;
radarr.enable = true; radarr.enable = true;
sonarr.enable = true; sonarr.enable = true;
jellyseerr = {
enable = true;
openFirewall = true;
};
jellyfin.enable = true; jellyfin.enable = true;
}; };

View File

@ -288,6 +288,10 @@ in
} }
(ssoServer "generic") (ssoServer "generic")
]; ];
"gib.${pubDomain}" = {
locations."/".proxyPass = "http://jackflix-ctr.${domain}:5055";
useACMEHost = pubDomain;
};
"jackflix.${pubDomain}" = "jackflix.${pubDomain}" =
let let

View File

@ -335,6 +335,16 @@ in
(persistSimpleSvc "jackett") (persistSimpleSvc "jackett")
(persistSimpleSvc "radarr") (persistSimpleSvc "radarr")
(persistSimpleSvc "sonarr") (persistSimpleSvc "sonarr")
(mkIf config.services.jellyseerr.enable {
my.tmproot.persistence.config.directories = [
{
directory = "/var/lib/jellyseerr";
mode = "0750";
user = "jellyseerr";
group = "jellyseerr";
}
];
})
(mkIf config.services.minio.enable { (mkIf config.services.minio.enable {
my.tmproot.persistence.config.directories = [ my.tmproot.persistence.config.directories = [
{ {