Skip to content

Instantly share code, notes, and snippets.

@r-vdp
Last active March 6, 2020 13:50
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 r-vdp/b18a8cc0e1d8180e1f8887af6f500993 to your computer and use it in GitHub Desktop.
Save r-vdp/b18a8cc0e1d8180e1f8887af6f500993 to your computer and use it in GitHub Desktop.
{ lib, ... }:
with lib;
let
subOpts = { name, ... }: {
options = {
name = mkOption {
type = types.int;
};
};
config = {
name = mkDefault name;
};
};
in {
options = {
opts = mkOption {
type = with types; attrsOf (submodule subOpts);
};
};
config = {
opts = {
test = {
name = "foo";
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment