Skip to content

Commit

Permalink
fix: remove unnecessary nullOr
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Jan 16, 2024
1 parent 8f9e261 commit 56322e7
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions nix/commands/nestedOptions.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ let
in
{
prefix = mkOption {
type = types.nullOr types.str;
type = types.str;
default = "";
description = ''
Can be used as ${flat "prefix"} for all
Expand All @@ -32,7 +32,7 @@ in
};

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

packages = mkOption {
type =
types.nullOr (
attrsNestedOf (types.oneOf [
attrsNestedOf (
types.oneOf [
strOrPackage
pairHelpPackageType
]));
]
);
default = { };
description = ''
A leaf value:
Expand Down Expand Up @@ -101,11 +102,12 @@ in

commands = mkOption {
type =
types.nullOr (
attrsNestedOf (types.oneOf [
attrsNestedOf (
types.oneOf [
types.str
pairHelpCommandType
]));
]
);
default = { };
description = ''
A leaf value:
Expand All @@ -127,7 +129,7 @@ in
};

help = mkOption {
type = types.nullOr types.str;
type = types.str;
default = "";
description = ''
Can be used as ${flat "hel"} for all
Expand All @@ -145,7 +147,7 @@ in
};

helps = mkOption {
type = types.nullOr (attrsNestedOf types.str);
type = attrsNestedOf types.str;
default = { };
description = ''
A leaf value can be used as ${flat "help"}
Expand Down Expand Up @@ -187,7 +189,7 @@ in
};

exposes = mkOption {
type = types.nullOr (attrsNestedOf types.bool);
type = attrsNestedOf types.bool;
default = { };
description = ''
A leaf value can be used as ${flat "expose"}
Expand Down

0 comments on commit 56322e7

Please sign in to comment.