From 691f683c8c3e5423bfe39e3c12f5a325130ec014 Mon Sep 17 00:00:00 2001 From: Benno Fünfstück Date: Mon, 9 Feb 2015 21:49:01 +0100 Subject: types.nix: better error message for non-paths This improves error messages when a set or a list is used where a path was expected. For an example, if you used a package set (as opposed to a single package) in systemPackages before this commit, the error was: ``` cannot coerce a list to a string, at "/home/nixpkgs/lib/types.nix":103:37 ``` Now, the error message reads: ``` The option value `environment.systemPackages' in `/etc/nixos/configuration.nix' is not a list of paths. ``` --- nixos/modules/config/system-path.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/modules/config') diff --git a/nixos/modules/config/system-path.nix b/nixos/modules/config/system-path.nix index 62390f452ba..d7979593f40 100644 --- a/nixos/modules/config/system-path.nix +++ b/nixos/modules/config/system-path.nix @@ -57,7 +57,7 @@ in environment = { systemPackages = mkOption { - type = types.listOf types.path; + type = types.listOf types.package; default = []; example = literalExample "[ pkgs.firefox pkgs.thunderbird ]"; description = '' -- cgit 1.4.1