Created
October 19, 2023 21:00
-
-
Save infinisil/c5d7b8b65ed3ed9e53f2346bcb263308 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
(import <nixpkgs/lib>).evalModules { | |
modules = [ | |
./generic.nix | |
./specific1.nix | |
./specific2.nix | |
]; | |
} |
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
{ lib, ... }: | |
{ | |
options.releases = lib.mkOption { | |
type = lib.types.attrsOf ( | |
lib.types.submodule { | |
options.variant = lib.mkOption { | |
type = lib.types.enum [ ]; | |
}; | |
options.someGenericOption = lib.mkOption { | |
type = lib.types.int; | |
default = 0; | |
}; | |
} | |
); | |
}; | |
} |
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
{ lib, ... }: | |
{ | |
options.releases = lib.mkOption { | |
type = lib.types.attrsOf ( | |
lib.types.submodule { | |
options.variant = lib.mkOption { | |
type = lib.types.enum [ "specific1" ]; | |
}; | |
options.specific1.someSpecificOption = lib.mkOption { | |
type = lib.types.int; | |
default = 0; | |
}; | |
} | |
); | |
}; | |
} |
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
{ lib, ... }: | |
{ | |
options.releases = lib.mkOption { | |
type = lib.types.attrsOf ( | |
lib.types.submodule { | |
options.variant = lib.mkOption { | |
type = lib.types.enum [ "specific2" ]; | |
}; | |
options.specific2.someSpecificOption = lib.mkOption { | |
type = lib.types.int; | |
default = 0; | |
}; | |
} | |
); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment