diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2014-06-30 09:03:33 +0400 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2014-06-30 09:03:33 +0400 |
commit | f2e9ebbd46e4026d760118701c6decf01b50f024 (patch) | |
tree | 5b230ff64635587b395f66f3c795c6f3cf94b80a | |
parent | 0ecfc6cb49d80451f8944913ff51b55ca2151430 (diff) | |
parent | d8b21c22245af2d6a6582df3290921ac5ca26235 (diff) |
Merge pull request #2283 from wizeman/u/sysctl-merge
nixos: Fix sysctl option merging
-rw-r--r-- | nixos/modules/config/sysctl.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index 542360219193..3b6ccd380c75 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -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 |