diff --git a/CHANGELOG.md b/CHANGELOG.md index de5726c..ed936d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +Added: +- `whisparr` service +- `komgarr` service + ## 2025-06-03 Added: diff --git a/flake.lock b/flake.lock index 2507403..28ed4d2 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1748662220, - "narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", + "lastModified": 1750183894, + "narHash": "sha256-ZtOgEt70keBVB4YJc+z7m0h7J1BOlv/GjHE1YC6KxeA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643", + "rev": "f45e75fc63fc8a7ffc3da382b2f6b681c5b71875", "type": "github" }, "original": { @@ -25,11 +25,11 @@ }, "vpnconfinement": { "locked": { - "lastModified": 1743810720, - "narHash": "sha256-kbv/W4gizUSa6qH2rUQdgPj9AJaeN9k2XSWUYqj7IMU=", + "lastModified": 1749672087, + "narHash": "sha256-j8LG0s0QcvNkZZLcItl78lvTZemvsScir0dG3Ii4B1c=", "owner": "Maroka-chan", "repo": "VPN-Confinement", - "rev": "74ae51e6d18b972ecc918ab43e8bde60c21a65d8", + "rev": "880b3bd2c864dce4f6afc79f6580ca699294c011", "type": "github" }, "original": { diff --git a/nixarr/nixarr-command/default.nix b/nixarr/nixarr-command/default.nix index a9067be..e78ef07 100644 --- a/nixarr/nixarr-command/default.nix +++ b/nixarr/nixarr-command/default.nix @@ -41,18 +41,18 @@ with lib; let fi find "${nixarr.mediaDir}" \( -type d -exec chmod 0775 {} + -true \) -o \( -exec chmod 0664 {} + \) - ${strings.optionalString nixarr.jellyfin.enable '' + mkdir -p "${nixarr.mediaDir}/library" chown -R ${globals.libraryOwner.user}:${globals.libraryOwner.group} "${nixarr.mediaDir}/library" + + ${strings.optionalString nixarr.jellyfin.enable '' chown -R ${globals.jellyfin.user}:root "${nixarr.jellyfin.stateDir}" find "${nixarr.jellyfin.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) ''} ${strings.optionalString nixarr.plex.enable '' - chown -R ${globals.libraryOwner.user}:${globals.libraryOwner.group} "${nixarr.mediaDir}/library" chown -R ${globals.plex.user}:root "${nixarr.plex.stateDir}" find "${nixarr.plex.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) ''} ${strings.optionalString nixarr.audiobookshelf.enable '' - chown -R ${globals.libraryOwner.user}:${globals.libraryOwner.group} "${nixarr.mediaDir}/library" chown -R ${globals.audiobookshelf.user}:root "${nixarr.audiobookshelf.stateDir}" find "${nixarr.audiobookshelf.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) ''} @@ -109,6 +109,14 @@ with lib; let ${strings.optionalString nixarr.recyclarr.enable '' chown -R ${globals.recyclarr.user}:root "${nixarr.recyclarr.stateDir}" find "${nixarr.recyclarr.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) + ''} + ${strings.optionalString nixarr.whisparr.enable '' + chown -R ${globals.whisparr.user}:root "${nixarr.whisparr.stateDir}" + find "${nixarr.whisparr.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) + ''} + ${strings.optionalString nixarr.komga.enable '' + chown -R ${globals.komga.user}:root "${nixarr.komga.stateDir}" + find "${nixarr.komga.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) ''} } @@ -116,7 +124,6 @@ with lib; let if [ "$#" -ne 1 ]; then echo "Illegal number of parameters. Usage: nixarr list-unlinked " fi - find "$1" -type f -links 1 -exec du -h {} + | sort -h } @@ -161,6 +168,10 @@ with lib; let ${strings.optionalString nixarr.sonarr.enable '' SONARR=$(xq '.Config.ApiKey' "${nixarr.sonarr.stateDir}/config.xml") echo "Sonarr api-key: $SONARR" + ''} + ${strings.optionalString nixarr.whisparr.enable '' + WHISPARR=$(xq '.Config.ApiKey' "${nixarr.whisparr.stateDir}/config.xml") + echo "Whisparr api-key: $WHISPARR" ''} ${strings.optionalString nixarr.sonarr.enable '' TRANSMISSION_RPC_USER=$(yq '.["rpc-username"]' "${nixarr.transmission.stateDir}/.config/transmission-daemon/settings.json") @@ -184,7 +195,7 @@ with lib; let echo "Wiping all nixarr users and groups from /etc/passwd and /etc/group..." - sed -i -E '/^(audiobookshelf|autobrr|bazarr|cross-seed|jellyfin|jellyseerr|lidarr|plex|prowlarr|radarr|readarr|recyclarr|sabnzbd|sonarr|streamer|torrenter|transmission|usenet)/d' /etc/passwd + sed -i -E '/^(audiobookshelf|autobrr|bazarr|cross-seed|jellyfin|jellyseerr|lidarr|plex|prowlarr|radarr|readarr|recyclarr|sabnzbd|sonarr|streamer|torrenter|transmission|usenet|whisparr|komgarr)/d' /etc/passwd sed -i -E '/^(autobrr|cross-seed|jellyseerr|media|prowlarr|recyclarr|sabnzbd|streamer|torrenter|transmission|usenet)/d' /etc/group echo ""