-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
sway: add preCheckConfig to customize check environment #5315
base: master
Are you sure you want to change the base?
Conversation
d8d7fb6
to
117a675
Compare
Some situations may require altering the config file itself to remove or adjust things. While this of course reduces the correctness of the check, it may be better to lose a little than be forced to disable the check altogether.
117a675
to
5256fd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not worth the complexity IMO. Either users make it work in hte sandbox or they disable the check. One thing we could do if there are too many complaints is to toggle the check off by default
Where exactly is the complexity? It’s one new option and two lines of code to use it (plus tests). FWIW, there’s precedence for this sort of thing in NixOS modules (e.g. bird and nftables, which I based this off knowing those exist). Tbh, it doesn’t really matter too much to me as I personally do not need this, and if I did, I would just patch it as I did the actual check for a year. One argument is that, unlike pkgs, it’s not possible to use overlays for modules, which causes frustration for folks when they want extensibility (so the only way to extend is to patch, which can be cumbersome for some). |
the diff is 40 lines to modify the check such that it doesn't check the final config, turning it into a potentially useless check. If you dont use it I dont see why we should carry the burden upstream.
You can perfectly add options under the same namespace via imports. You can see here https://github.com/teto/home/blob/main/hm/modules/zsh.nix how I extend the zsh module for instance. |
I added it to try to solve a problem people had in the linked issue. The alternative to “potentially useless” is, as noted in the commit msg, totally useless as it had to be disabled. That works if the extension is additive, but I don’t see how it works if the “extension” needs to modify an existing thing without completely overwriting it. If you have an example of that, I’d certainly be interested to see it as I repeatedly face such a problem in both HM and NixOS config. |
Description
See commit messages.
Checklist
Change is backwards compatible.
Code formatted with
./format
.Code tested through
nix-shell --pure tests -A run.all
ornix develop --ignore-environment .#all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC