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.
This commit is contained in:
Robert Helgesson 2017-01-08 10:24:16 +01:00
parent a1cb111cc3
commit 671805009c
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -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"