Update sonarr.nix

This commit is contained in:
ediblerope 2026-01-22 09:39:31 +00:00 committed by GitHub
parent 624d5885f3
commit 605d9c53f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 -"