Last active
July 19, 2020 11:43
-
-
Save srhb/9e458a08f0230d239b584e497da90cad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# nix eval -f modules.nix | |
let | |
lib = import <nixpkgs/lib>; | |
eval = (import <nixpkgs/lib/modules.nix> { inherit lib; }).evalModules { | |
modules = [ | |
({ lib, ... }: with lib; { | |
options.roles.a = mkOption { | |
type = types.str; | |
}; | |
}) | |
({ lib, ... }: with lib; { | |
options.roles.b = mkOption { | |
type = types.str; | |
}; | |
}) | |
({ | |
roles.a = "foo"; | |
roles.b = "bar"; | |
}) | |
]; | |
}; | |
in | |
eval.config.roles.a + eval.config.roles.b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment