various: prefer ints.between over enum for int ranges
This commit is contained in:
@@ -98,12 +98,7 @@ in
|
||||
'';
|
||||
};
|
||||
report_delay = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
];
|
||||
type = lib.types.ints.between 1 4;
|
||||
default = 3;
|
||||
description = ''
|
||||
The interval between system status reportings.
|
||||
|
||||
@@ -154,14 +154,7 @@ in
|
||||
|
||||
logLevel = lib.mkOption {
|
||||
default = 1;
|
||||
type = lib.types.enum [
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
];
|
||||
type = lib.types.ints.between 0 5;
|
||||
description = "Log level (0 = DEBUG, 5 = FATAL).";
|
||||
};
|
||||
|
||||
|
||||
@@ -108,13 +108,7 @@ in
|
||||
};
|
||||
|
||||
LogLevel = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
];
|
||||
type = lib.types.ints.between 0 4;
|
||||
description = ''
|
||||
Default log level from 0 to 4 (debug, info, important, warning,
|
||||
error).
|
||||
|
||||
Reference in New Issue
Block a user