1{ lib, ... }:
2let
3 inherit (lib) types mkOption;
4in
5{
6 options.either = mkOption {
7 type = types.submodule ({
8 freeformType = (types.either types.int types.int);
9 });
10 };
11
12 options.eitherBehindNullor = mkOption {
13 type = types.submodule ({
14 freeformType = types.nullOr (types.either types.int types.int);
15 });
16 };
17
18 options.oneOf = mkOption {
19 type = types.submodule ({
20 freeformType = (
21 types.oneOf [
22 types.int
23 types.int
24 ]
25 );
26 });
27 };
28
29 options.number = mkOption {
30 type = types.submodule ({
31 freeformType = (types.number); # either int float
32 });
33 };
34}