various: prefer ints.between over enum for int ranges

This commit is contained in:
h7x4
2025-09-22 15:22:25 +02:00
parent 34fe1083bd
commit 32a008369e
3 changed files with 3 additions and 21 deletions

View File

@@ -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.

View File

@@ -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).";
};

View File

@@ -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).