Closed loqusion closed 11 months ago
Why close? Did you find documentation? I'm kinda blocked as well around this topic of "how to actually do a module"
This shows an example on how to define a custom option that will put things under the root flake.
https://github.com/hercules-ci/flake-parts/blob/main/modules/nixosModules.nix#L14
You can use the mkSubmoduleOptions
from flake-parts-lib
.
I'm trying to add a custom option
lib
to my reusable flake module, and here's what the documentation has to say about it (emphasis added):However, this piece of documentation does not answer the question "how do I declare an option?", nor does it provide a link doing so. Looking through the rest of the documentation also does not provide any obvious answers.
It would be very helpful if a link that answers this question were present in this text, something like:
Or, alternatively, provide a code snippet that demonstrates how to do so.