Skip to content

Instantly share code, notes, and snippets.

@srhb
Created November 28, 2020 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srhb/47d24da59696d8aa6609eb8dd40dee6f to your computer and use it in GitHub Desktop.
Save srhb/47d24da59696d8aa6609eb8dd40dee6f to your computer and use it in GitHub Desktop.
let
eval = (import <nixpkgs/lib/modules.nix> { inherit lib; }).evalModules;
lib = (import <nixpkgs> {}).lib;
module = with lib; with types; {
options.option = mkOption {
default = [ { a = "Foo"; b = "Baar"; } ];
type = with types; listOf (submodule {
options = {
a = mkOption {};
b = mkOption {};
c = mkOption {};
};
});
};
};
in
eval {
modules = [
module
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment