i’ve been moving my nixos config/flake to using modules to define my own config options for easier use. however there is one thing i cannot seem to figure out how to do. how can i recreate how options like
fileSystems.<name> (and by extension all options that are available under a key like this) work? what i mean by that is, how can i define an option, that does not have a predefined name, but can be named in the file my module is imported in? also what are these user defined keys actually called in this context?
once this is working i would also like to know how i can use the user defined key as a value for options nested inside. i mean the same way that the
fileSystems options use the
<name> as the mount point, when
fileSystems.<name>.mountPoint is left null.
it should be possible, since nixos itself uses this a lot, i just don’t know what it is called and how to search for it on the internet. any help on this is appreciated.
thanks in advance : )