sysctl: remove unnecessary definition filtering

This commit is contained in:
Johannes Kirschbauer 2025-05-30 22:45:46 +02:00
parent 46be72d315
commit 6d8eca96ba
No known key found for this signature in database

View file

@ -9,7 +9,7 @@ let
checkType = x: lib.isBool x || lib.isString x || lib.isInt x || x == null; checkType = x: lib.isBool x || lib.isString x || lib.isInt x || x == null;
in in
checkType val || (val._type or "" == "override" && checkType val.content); checkType val || (val._type or "" == "override" && checkType val.content);
merge = loc: defs: lib.mergeOneOption loc (lib.filterOverrides defs); merge = loc: defs: lib.mergeOneOption loc defs;
}; };
in in
@ -22,9 +22,7 @@ in
type = type =
let let
highestValueType = lib.types.ints.unsigned // { highestValueType = lib.types.ints.unsigned // {
merge = merge = loc: defs: lib.foldl (a: b: if b.value == null then null else lib.max a b.value) 0 defs;
loc: defs:
lib.foldl (a: b: if b.value == null then null else lib.max a b.value) 0 (lib.filterOverrides defs);
}; };
in in
lib.types.submodule { lib.types.submodule {