Update sonarr.nix
This commit is contained in:
parent
624d5885f3
commit
605d9c53f7
1 changed files with 4 additions and 16 deletions
|
|
@ -12,30 +12,18 @@
|
||||||
group = "media";
|
group = "media";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Create a shared media group
|
# Media group is already created in qbittorrent-nox.nix
|
||||||
users.groups.media = {
|
# Just make sure sonarr is in it
|
||||||
gid = 3000; # Fixed GID for consistency
|
|
||||||
};
|
|
||||||
|
|
||||||
# Add users to media group
|
|
||||||
users.users.sonarr = {
|
users.users.sonarr = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "media";
|
group = "media";
|
||||||
extraGroups = [ "media" ];
|
extraGroups = [ "media" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Assuming qbittorrent-nox user exists, add to media group
|
|
||||||
users.users.qbittorrent-nox = {
|
|
||||||
extraGroups = [ "media" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Set up directory structure with proper permissions
|
# Set up directory structure with proper permissions
|
||||||
# The key is that both sonarr and qbittorrent write to the same filesystem
|
|
||||||
# and both are in the media group with write permissions
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
# Downloads folder - qbittorrent writes here
|
# Downloads folder - qbittorrent writes here (already in qbittorrent-nox.nix)
|
||||||
"d /mnt/storage/torrents/downloads 0775 qbittorrent-nox media -"
|
"Z /mnt/storage/torrents/downloads 0775 qbittorrent media -"
|
||||||
"Z /mnt/storage/torrents/downloads 0775 qbittorrent-nox media -" # Recursively fix existing
|
|
||||||
|
|
||||||
# Media folders - sonarr writes here
|
# Media folders - sonarr writes here
|
||||||
"d /mnt/storage/torrents/shows 0775 sonarr media -"
|
"d /mnt/storage/torrents/shows 0775 sonarr media -"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue