-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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/slskd: refactor and add config file options #281075
Conversation
e33c7ce
to
d3afcd1
Compare
Some of the options added depend on #281233 |
Hi! I'm wondering, why completely removing the log rotation? As logs are already captured on stdout by systemd, having them accumulate in /var/lib/slskd/logs (by default) is useless and takes more and more place… |
This remark aside, I like the nginx cleaner configuration, thanks! |
Also, (sorry, I think I really don't know how to be polite in English) but I'm wondering if being extensive and putting ~50 settings parameters is a good choice for maintainers. I'm not fond of rewriting the wheel, especially because the settings will change and we'll have to update those +400 SLOC reserved for settings definition. I did a quick check on the $ man configuration.nix | grep -Eo 'services\..*\.settings' | uniq -c | sort -n | tail
22 services.sftpgo.settings
24 services.syncthing.settings
28 services.parsedmarc.settings
28 services.transmission.settings
35 services.system76-scheduler.settings
37 services.headscale.settings
43 services.matrix-synapse.settings
92 services.grafana.settings
145 services.tor.settings
149 services.sourcehut.settings |
Disabling disk logging entirely by default seems like the easier option for relying on journald, so that's what I do in https://github.com/NixOS/nixpkgs/pull/281075/files#diff-4f8169c68e06f35fdf6ca23d92d2b10f8f6d9697554e2cc6a2689019b1bac9deR473
This is a reasonable worry, but I don't think it's much of a problem in reality. slskd doesn't seem to have changed the configuration very much so far, and future changes will probably be just occasionally adding new options, and maybe renaming (so only a few lines will have to be changed, rather than the whole set). I don't think the workload will be much greater than already checking the changelog to make sure the module works. |
Oh cool, I didn't see how to disable on-disk logging. And fine for the large settings, as long as you add yourself as a maintainer on the package. If you can add both of us as maintainers of the module as well (doc even if I suppose you already know that), that would be nice! |
Also, can you document the breaking changes in the relases notes? |
f438512
to
2d146db
Compare
Seems very nice. I'll test the PR on my server when it'll leave its draft status. |
I disagree with this. There has already been a big discussion around this topic in RFC 42, part 2, where it was generally agreed upon that we should be a bit limited with what options we declare. Maintaining everyones documentation and config schema is not a viable option. I don't think this mass influx of option declarations is a good idea, even if I might be inclined to agree that it looks better in the manual or on search.nixos.org. That being said, I do think there are some other very welcome changes in this PR. |
I wasn’t aware of this rfc, thanks for the explanation. I’ll pare this down when I can, then. |
I've removed most of the freeform options except those that I expect the majority of users to change - is this in line with the intention of that RFC? |
Yes, I think this seems a lot better! I'll have a closer look at it later |
6e08af1
to
0f04052
Compare
Forgot to push two fixes I had locally... This should be ready for merge, I think. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-already-reviewed/2617/1521 |
Description of changes
This PR adds the nixos module options matching those of the slskd config file and changes/fixes some behaviors of the module, most importantly fixing the nginx virtual-host behavior. Some of these are breaking changes.
This PR is a draft while I add the remaining options and fix the rough edges, to get some feedback early.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.