Show precise error messages in option merge failures
For instance, if time.timeZone is defined multiple times, you now get the error message: error: user-thrown exception: The unique option `time.timeZone' is defined multiple times, in `/etc/nixos/configurations/misc/eelco/x11vnc.nix' and `/etc/nixos/configuration.nix'. while previously you got: error: user-thrown exception: Multiple definitions of string. Only one is allowed for this option. and only an inspection of the stack trace gave a clue as to what option caused the problem.
This commit is contained in:
@@ -26,7 +26,7 @@ let
|
||||
configType = mkOptionType {
|
||||
name = "nixpkgs config";
|
||||
check = traceValIfNot isConfig;
|
||||
merge = fold mergeConfig {};
|
||||
merge = args: fold mergeConfig {};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user