Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/radarr,lidarr,readarr,whisparr,prowlarr: add settings option #384052

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Stunkymonkey
Copy link
Contributor

@Stunkymonkey Stunkymonkey commented Feb 21, 2025

follow-up: #373576

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Feb 21, 2025
@Stunkymonkey Stunkymonkey changed the title nixos/servarr: add settings option nixos/radarr,lidarr,readarr,whisparr,prowlarr: add settings option Feb 21, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Feb 21, 2025
@ambroisie
Copy link
Contributor

No apiKeyFile?

@Stunkymonkey
Copy link
Contributor Author

Stunkymonkey commented Feb 21, 2025

@ambroisie we could. Not sure, because it looked quiet complex to me for inserting just a string.

Should I add it?

@ambroisie
Copy link
Contributor

I think I'd care mainly if there was a way to set the various client API keys declaratively in Prowlarr, but that's not really doable from what I understand (except maybe if I hacked it in with some custom SQLite invocations...).

As it is, it feels like a small inconsistency with Sonarr's module.

@kevincox kevincox removed their request for review February 21, 2025 22:53
@kevincox
Copy link
Contributor

I have no particular knowledge of these services and it seems like there are many other interested reviewers. If you need someone to merge once everything is reviewed and touched up feel free to give me a ping, but until then I will step out.

Copy link
Contributor

@pta2002 pta2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this servarr directory, I feel it makes more sense to move the module files into it so they're all together.

As an added bonus, I'd suggest you could do a fairly simple nixos test which sets the API key and tries to hit the API with curl. I did something very similar in the autobrr PR I did a few days ago.

@pta2002
Copy link
Contributor

pta2002 commented Feb 22, 2025

I think I'd care mainly if there was a way to set the various client API keys declaratively in Prowlarr, but that's not really doable from what I understand (except maybe if I hacked it in with some custom SQLite invocations...).

It is if we script the API! I have a WIP implemention of that in my private config, I can push it tomorrow if you're interested. Something like configarr or recyclarr might work here too.

All in all it's about a 40-line python script though, and most of it is just niceties. It's really not complex.

However I'd say we really shouldn't block this PR on that. I can make a PR later with that if I can get it working well enough.

@Stunkymonkey Stunkymonkey force-pushed the servarr-settings branch 3 times, most recently from f021959 to 6dc393f Compare February 22, 2025 19:23
@Stunkymonkey Stunkymonkey marked this pull request as ready for review February 22, 2025 20:20
@Stunkymonkey Stunkymonkey requested a review from pta2002 February 22, 2025 20:35
@undefined-landmark
Copy link

Great work! Any reason not to turn the environmentFiles option into a function and reuse it across the different modules?

@Stunkymonkey
Copy link
Contributor Author

Great work! Any reason not to turn the environmentFiles option into a function and reuse it across the different modules?

surely we could. please have a look

Copy link
Contributor

@pta2002 pta2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, if you can confirm it works!

I would still suggest the test though, I think it would be a fairly simple thing that would add some confidence to any future changes in these modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants