nixos/*: add trivial defaultText to options where applicable#147441
nixos/*: add trivial defaultText to options where applicable#147441roberth merged 3 commits intoNixOS:masterfrom pennae:option-doc-staticizing
Conversation
|
Note that I originally suggested per-module commits for modules with non-trivial changes (which would include the trivial changes for said module too). For trivial only changes, maybe some grouping in bite-sized chunks. I did also say that if it was my opinion only, I would do it just like this was done now, so I don't mind personally, I only know other contributors, maintainers and devs don't like a flood of discrete commits :). |
|
Please merge when ofborg is successful. 🚀 |
we don't have commit permissions, so someone else will have to :D |
Note that we also have a style rule that NixOS changes should be prefixed by |
Mhm, so a treewide NixOS change is kind of undefined behavior. I've created a (probably naive) PR to fix that: #148996 |
"trivial" here means "can just copy the expression, add quotes and it's useful". this mostly means that the default expressions given don't use shortcuts like the ubiquitous
cfg = config.${our module name}, runs data through a function not in the default expression, or just anything that can't be read in isolation without knowing the context.working towards caching most of the option documentation to improve build times. this change might speed up the build a little already, but further changes that improve this even more are upcoming.
we have a good few more commits that add defaultTexts to the remaining options that use
cfgshortcuts in their defaults or more complicated expressions, will open a PR with those once this is merged (unless there's wishes to include those changes here). after that we'll probably have some more changes (based on #147265) that make most of the option docs for nixos/modules cacheable.one commit per module by request of @samueldr :)