From fa4f9197eeb5d0c881d646f02f58cf0c2c7b1aff Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 2 Nov 2017 11:19:12 +0100 Subject: [PATCH] home-manager: avoid import to improve error messages When using `import` to inject the configuration into the module system we lose the location in error messages, i.e., it just says ``'`. --- home-manager/home-manager.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/home-manager/home-manager.nix b/home-manager/home-manager.nix index 206a1bcef..a4b3c4439 100644 --- a/home-manager/home-manager.nix +++ b/home-manager/home-manager.nix @@ -11,10 +11,9 @@ let env = import { configuration = - let - conf = import confPath; - in - if confAttr == "" then conf else conf.${confAttr}; + if confAttr == "" + then confPath + else (import confPath).${confAttr}; pkgs = pkgs; check = check; };