From 671805009cde0cea186318724ef97397ed4b0b76 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 8 Jan 2017 10:24:16 +0100 Subject: [PATCH] home-manager: use absolute path to configuration Nix needs an absolute path and the user may have given a relative path for the configuration file. We therefore need to expand it using the `realpath` tool. --- home-manager/home-manager | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/home-manager/home-manager b/home-manager/home-manager index 1667564a..fffffad0 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -6,13 +6,16 @@ function doRebuild() { exit 1 fi + local confFile + confFile="$(realpath "$1")" + local wrkdir wrkdir="$(mktemp -d)" nix-build --show-trace \ "@HOME_MANAGER_EXPR_PATH@" \ --argstr modulesPath "$HOME/.nixpkgs/home-manager/modules" \ - --argstr confPath "$1" \ + --argstr confPath "$confFile" \ -A activation-script \ -o "$wrkdir/activate"