mkDerivedConfig
lib.mkDerivedConfig
Docs pulled from | This Revision | about 1 hour ago
mkDerivedConfig : Option a -> (a -> Definition b) -> Definition b
Create config definitions with the same priority as the definition of another option.
This should be used for option definitions where one option sets the value of another as a convenience.
For instance a config file could be set with a text
or source
option, where text translates to a source
value using mkDerivedConfig options.text (pkgs.writeText "filename.conf")
.
It takes care of setting the right priority using mkOverride
.
Inputs
opt
-
1. Function argument
f
-
2. Function argument
Noogle detected
Implementation
The following is the current implementation of this function.
mkDerivedConfig = opt: f:
mkOverride
(opt.highestPrio or defaultOverridePriority)
(f opt.value);