NixOS Module System | 186 Members | |
| 40 Servers |
| Sender | Message | Time |
|---|---|---|
| 27 May 2024 | ||
| Probably the easiest way to accomplish something like this would be to have all of the profiles imported, but control what gets applied with options Something like: common: | 01:34:41 | |
Sam Lehman: Yes, evalModules should capture the whole tree of imports and deduplicated moduled key property.However, if you are using flakes, the key attribute is not initialized if the module is not listed as a path, to be imported by the module system. | 09:42:10 | |
* Sam Lehman: Yes, evalModules should capture the whole tree of imports and deduplicated moduled key property.However, if you are using flakes, and define a nixosModules within the flake.nix file, then the key attribute is not initialized to any value which can safely be deduplicated. | 09:43:28 | |
infinisil: I just watch your stream from a month ago. _options used to be the default, except that it got removed in favor of toJSON / toTOML functions 🤦 | 17:07:25 | |
* infinisil: I just watch your stream from a month ago. _options used to be the default in submodules, except that it got removed in favor of toJSON / toTOML functions 🤦 | 17:07:36 | |
| @nbp:mozilla.org Aren't you thinking of _module? | 17:09:00 | |
| I'm the one who removed that in submodules ;) | 17:10:35 | |
Yes _module was one way to expose the internal details. | 17:12:15 | |
| There are multiple problems to finding the declarations of a submodule option. | 17:12:47 | |
| One of them is the apply function, which implies that the content would be post-processed. | 17:13:32 | |
| Another one, which I bet nobody noticed, is that you can add submodules at the definition site:
| 17:19:11 | |