Created
March 15, 2019 14:52
-
-
Save danbst/c925b77ef7cc349c632dc9edd7659771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
sub = { config, lib, parentConfig, ...}: { | |
options.foo = lib.mkOption { | |
type = lib.types.bool; | |
default = parentConfig.bar; | |
}; | |
}; | |
in { config, lib, ...}: { | |
options.bar = lib.mkOption { type = lib.types.bool; default = true; }; | |
options.bla = lib.mkOption { | |
type = with lib.types; attrsOf (submodule { imports = [sub]; _module.args.parentConfig = config; }); | |
}; | |
config.bla.test = {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment