Use mkEnableOption throughout Nixos where appropriate#18526
Use mkEnableOption throughout Nixos where appropriate#18526langston-barrett wants to merge 115 commits intoNixOS:masterfrom langston-barrett:mkEnableOption
Conversation
|
@siddharthist, thanks for your PR! By analyzing the annotation information on this pull request, we identified @domenkozar, @edolstra and @unjordy to be potential reviewers |
import mkEnableOption
import mkEnableOption
|
I (very opinionated) think such abstractions do more harm than good. I don't mind a little verbosity (no logic, just parameters) for sake of less abstraction. But having said that, this one is not too bad and it's mostly self explainatory once the definition of the function is looked up. +0 |
|
+1 on making stuff consistent +0 |
|
I think this has two major advantages:
And one major disadvantage:
I leave it up to the maintainers which of those goals are more important. If we decide not to merge this PR, I propose eliminating |
|
-0.5 as this potentially overlaps with #14860 (which adds more value) |
|
I think we should get rid of
|
|
I emphatically agree with @chris-martin. I remember it being very tricky to orient myself around NixOS modules, and I don't think this would help. |
|
After a week, feedback is mostly negative. I propose to close this. |
|
Sorry @siddharthist :) |
|
@siddharthist I ❤️ your script thought. Pretty streamlined way of doing a bunch of similar changes and still keeping them in separated an validated commits. |
|
@siddhanathan can you please reopen and retest your PR? |
Motivation for this change
From #18524:
I wrote this script:
I was conservative, and only accepted diffs where the description was close to exactly the same. I've also broken it up into a commit per file, which will allow for easier reverting (without redoing all this work), should a problem arise.
Next steps would be to review the diffs where the script broke/did not correctly fill in the description, and manually change those to use
mkEnableOption.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)