Skip to content

Commit cf7ff94

Browse files
committed
fix: remove unnecessary nullOr
1 parent b17c52c commit cf7ff94

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

nix/commands/nestedOptions.nix

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let
1414
in
1515
{
1616
prefix = mkOption {
17-
type = types.nullOr types.str;
17+
type = types.str;
1818
default = "";
1919
description = ''
2020
Can be used as ${flat "prefix"} for all
@@ -32,7 +32,7 @@ in
3232
};
3333

3434
prefixes = mkOption {
35-
type = types.nullOr (attrsNestedOf types.str);
35+
type = attrsNestedOf types.str;
3636
default = { };
3737
description = ''
3838
A leaf value becomes ${flat "prefix"}
@@ -53,11 +53,12 @@ in
5353

5454
packages = mkOption {
5555
type =
56-
types.nullOr (
57-
attrsNestedOf (types.oneOf [
56+
attrsNestedOf (
57+
types.oneOf [
5858
strOrPackage
5959
pairHelpPackageType
60-
]));
60+
]
61+
);
6162
default = { };
6263
description = ''
6364
A leaf value:
@@ -101,11 +102,12 @@ in
101102

102103
commands = mkOption {
103104
type =
104-
types.nullOr (
105-
attrsNestedOf (types.oneOf [
105+
attrsNestedOf (
106+
types.oneOf [
106107
types.str
107108
pairHelpCommandType
108-
]));
109+
]
110+
);
109111
default = { };
110112
description = ''
111113
A leaf value:
@@ -127,7 +129,7 @@ in
127129
};
128130

129131
help = mkOption {
130-
type = types.nullOr types.str;
132+
type = types.str;
131133
default = "";
132134
description = ''
133135
Can be used as ${flat "hel"} for all
@@ -145,7 +147,7 @@ in
145147
};
146148

147149
helps = mkOption {
148-
type = types.nullOr (attrsNestedOf types.str);
150+
type = attrsNestedOf types.str;
149151
default = { };
150152
description = ''
151153
A leaf value can be used as ${flat "help"}
@@ -187,7 +189,7 @@ in
187189
};
188190

189191
exposes = mkOption {
190-
type = types.nullOr (attrsNestedOf types.bool);
192+
type = attrsNestedOf types.bool;
191193
default = { };
192194
description = ''
193195
A leaf value can be used as ${flat "expose"}

0 commit comments

Comments
 (0)