fix(media): resolve arr stack deployment failures
- prowlarr: remove serviceFilePerms (DynamicUser has no static user) - sonarr/radarr: move media dir creation to system-level tmpfiles rules to avoid unsafe path transition from /torrents (qbittorrent:media) - jellyseerr: override DynamicUser=false, create static user/group, use serviceFilePerms for ZFS-backed configDir permissions Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -10,6 +10,9 @@
|
|||||||
(lib.serviceMountWithZpool "jellyseerr" service_configs.zpool_ssds [
|
(lib.serviceMountWithZpool "jellyseerr" service_configs.zpool_ssds [
|
||||||
service_configs.jellyseerr.configDir
|
service_configs.jellyseerr.configDir
|
||||||
])
|
])
|
||||||
|
(lib.serviceFilePerms "jellyseerr" [
|
||||||
|
"Z ${service_configs.jellyseerr.configDir} 0700 jellyseerr jellyseerr"
|
||||||
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
services.jellyseerr = {
|
services.jellyseerr = {
|
||||||
@@ -18,10 +21,19 @@
|
|||||||
configDir = service_configs.jellyseerr.configDir;
|
configDir = service_configs.jellyseerr.configDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow DynamicUser to write to custom configDir on ZFS
|
systemd.services.jellyseerr.serviceConfig = {
|
||||||
systemd.services.jellyseerr.serviceConfig.ReadWritePaths = [
|
DynamicUser = lib.mkForce false;
|
||||||
service_configs.jellyseerr.configDir
|
User = "jellyseerr";
|
||||||
];
|
Group = "jellyseerr";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.jellyseerr = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "jellyseerr";
|
||||||
|
home = service_configs.jellyseerr.configDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.jellyseerr = { };
|
||||||
|
|
||||||
services.caddy.virtualHosts."jellyseerr.${service_configs.https.domain}".extraConfig = ''
|
services.caddy.virtualHosts."jellyseerr.${service_configs.https.domain}".extraConfig = ''
|
||||||
import ${config.age.secrets.caddy_auth.path}
|
import ${config.age.secrets.caddy_auth.path}
|
||||||
|
|||||||
@@ -10,9 +10,6 @@
|
|||||||
(lib.serviceMountWithZpool "prowlarr" service_configs.zpool_ssds [
|
(lib.serviceMountWithZpool "prowlarr" service_configs.zpool_ssds [
|
||||||
service_configs.prowlarr.dataDir
|
service_configs.prowlarr.dataDir
|
||||||
])
|
])
|
||||||
(lib.serviceFilePerms "prowlarr" [
|
|
||||||
"Z ${service_configs.prowlarr.dataDir} 0700 prowlarr prowlarr"
|
|
||||||
])
|
|
||||||
(lib.vpnNamespaceOpenPort service_configs.ports.prowlarr "prowlarr")
|
(lib.vpnNamespaceOpenPort service_configs.ports.prowlarr "prowlarr")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
])
|
])
|
||||||
(lib.serviceFilePerms "radarr" [
|
(lib.serviceFilePerms "radarr" [
|
||||||
"Z ${service_configs.radarr.dataDir} 0700 ${config.services.radarr.user} ${config.services.radarr.group}"
|
"Z ${service_configs.radarr.dataDir} 0700 ${config.services.radarr.user} ${config.services.radarr.group}"
|
||||||
"d ${service_configs.media.moviesDir} 0775 ${config.services.radarr.user} ${service_configs.media_group}"
|
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,15 @@
|
|||||||
])
|
])
|
||||||
(lib.serviceFilePerms "sonarr" [
|
(lib.serviceFilePerms "sonarr" [
|
||||||
"Z ${service_configs.sonarr.dataDir} 0700 ${config.services.sonarr.user} ${config.services.sonarr.group}"
|
"Z ${service_configs.sonarr.dataDir} 0700 ${config.services.sonarr.user} ${config.services.sonarr.group}"
|
||||||
"d ${service_configs.media.tvDir} 0775 ${config.services.sonarr.user} ${service_configs.media_group}"
|
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d /torrents/media 2775 root ${service_configs.media_group} -"
|
||||||
|
"d ${service_configs.media.tvDir} 2775 root ${service_configs.media_group} -"
|
||||||
|
"d ${service_configs.media.moviesDir} 2775 root ${service_configs.media_group} -"
|
||||||
|
];
|
||||||
|
|
||||||
services.sonarr = {
|
services.sonarr = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dataDir = service_configs.sonarr.dataDir;
|
dataDir = service_configs.sonarr.dataDir;
|
||||||
|
|||||||
Reference in New Issue
Block a user