whisparr/komgarr

This commit is contained in:
rasmus-kirk
2025-06-18 14:26:18 +02:00
parent b18ccb8a23
commit 53a1cb1c53
3 changed files with 28 additions and 11 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog # Changelog
## Unreleased
Added:
- `whisparr` service
- `komgarr` service
## 2025-06-03 ## 2025-06-03
Added: Added:
Generated
+6 -6
View File
@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1748662220, "lastModified": 1750183894,
"narHash": "sha256-7gGa49iB9nCnFk4h/g9zwjlQAyjtpgcFkODjcOQS0Es=", "narHash": "sha256-ZtOgEt70keBVB4YJc+z7m0h7J1BOlv/GjHE1YC6KxeA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "59138c7667b7970d205d6a05a8bfa2d78caa3643", "rev": "f45e75fc63fc8a7ffc3da382b2f6b681c5b71875",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -25,11 +25,11 @@
}, },
"vpnconfinement": { "vpnconfinement": {
"locked": { "locked": {
"lastModified": 1743810720, "lastModified": 1749672087,
"narHash": "sha256-kbv/W4gizUSa6qH2rUQdgPj9AJaeN9k2XSWUYqj7IMU=", "narHash": "sha256-j8LG0s0QcvNkZZLcItl78lvTZemvsScir0dG3Ii4B1c=",
"owner": "Maroka-chan", "owner": "Maroka-chan",
"repo": "VPN-Confinement", "repo": "VPN-Confinement",
"rev": "74ae51e6d18b972ecc918ab43e8bde60c21a65d8", "rev": "880b3bd2c864dce4f6afc79f6580ca699294c011",
"type": "github" "type": "github"
}, },
"original": { "original": {
+16 -5
View File
@@ -41,18 +41,18 @@ with lib; let
fi fi
find "${nixarr.mediaDir}" \( -type d -exec chmod 0775 {} + -true \) -o \( -exec chmod 0664 {} + \) 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" 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}" chown -R ${globals.jellyfin.user}:root "${nixarr.jellyfin.stateDir}"
find "${nixarr.jellyfin.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) find "${nixarr.jellyfin.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \)
''} ''}
${strings.optionalString nixarr.plex.enable '' ${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}" chown -R ${globals.plex.user}:root "${nixarr.plex.stateDir}"
find "${nixarr.plex.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) find "${nixarr.plex.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \)
''} ''}
${strings.optionalString nixarr.audiobookshelf.enable '' ${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}" chown -R ${globals.audiobookshelf.user}:root "${nixarr.audiobookshelf.stateDir}"
find "${nixarr.audiobookshelf.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) 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 '' ${strings.optionalString nixarr.recyclarr.enable ''
chown -R ${globals.recyclarr.user}:root "${nixarr.recyclarr.stateDir}" chown -R ${globals.recyclarr.user}:root "${nixarr.recyclarr.stateDir}"
find "${nixarr.recyclarr.stateDir}" \( -type d -exec chmod 0700 {} + -true \) -o \( -exec chmod 0600 {} + \) 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 if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters. Usage: nixarr list-unlinked <path>" echo "Illegal number of parameters. Usage: nixarr list-unlinked <path>"
fi fi
find "$1" -type f -links 1 -exec du -h {} + | sort -h find "$1" -type f -links 1 -exec du -h {} + | sort -h
} }
@@ -161,6 +168,10 @@ with lib; let
${strings.optionalString nixarr.sonarr.enable '' ${strings.optionalString nixarr.sonarr.enable ''
SONARR=$(xq '.Config.ApiKey' "${nixarr.sonarr.stateDir}/config.xml") SONARR=$(xq '.Config.ApiKey' "${nixarr.sonarr.stateDir}/config.xml")
echo "Sonarr api-key: $SONARR" 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 '' ${strings.optionalString nixarr.sonarr.enable ''
TRANSMISSION_RPC_USER=$(yq '.["rpc-username"]' "${nixarr.transmission.stateDir}/.config/transmission-daemon/settings.json") 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..." 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 sed -i -E '/^(autobrr|cross-seed|jellyseerr|media|prowlarr|recyclarr|sabnzbd|streamer|torrenter|transmission|usenet)/d' /etc/group
echo "" echo ""