mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
Merge pull request #2283 from wizeman/u/sysctl-merge
nixos: Fix sysctl option merging
This commit is contained in:
commit
f2e9ebbd46
@ -6,8 +6,12 @@ let
|
||||
|
||||
sysctlOption = mkOptionType {
|
||||
name = "sysctl option value";
|
||||
check = x: isBool x || isString x || isInt x || isNull x;
|
||||
merge = args: defs: (last defs).value; # FIXME: hacky way to allow overriding in configuration.nix.
|
||||
check = val:
|
||||
let
|
||||
checkType = x: isBool x || isString x || isInt x || isNull x;
|
||||
in
|
||||
checkType val || (val._type or "" == "override" && checkType val.content);
|
||||
merge = loc: defs: mergeOneOption loc (filterOverrides defs);
|
||||
};
|
||||
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user