aboutsummaryrefslogtreecommitdiff
path: root/home-manager
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2017-11-02 11:19:12 +0100
committerRobert Helgesson <robert@rycee.net>2017-11-02 11:19:12 +0100
commitfa4f9197eeb5d0c881d646f02f58cf0c2c7b1aff (patch)
treeb3d7891a1112ea5e5a96c8e0a88a78940e8cc7a5 /home-manager
parentbfb5a678d20c774417760a97556f08043674ac66 (diff)
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 ``<unknown-file>'`.
Diffstat (limited to 'home-manager')
-rw-r--r--home-manager/home-manager.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/home-manager/home-manager.nix b/home-manager/home-manager.nix
index 206a1bcefa3..a4b3c44390f 100644
--- a/home-manager/home-manager.nix
+++ b/home-manager/home-manager.nix
@@ -11,10 +11,9 @@ let
env = import <home-manager/modules> {
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;
};