mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
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:
parent
a1cb111cc3
commit
671805009c
1 changed files with 4 additions and 1 deletions
|
@ -6,13 +6,16 @@ function doRebuild() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local confFile
|
||||||
|
confFile="$(realpath "$1")"
|
||||||
|
|
||||||
local wrkdir
|
local wrkdir
|
||||||
wrkdir="$(mktemp -d)"
|
wrkdir="$(mktemp -d)"
|
||||||
|
|
||||||
nix-build --show-trace \
|
nix-build --show-trace \
|
||||||
"@HOME_MANAGER_EXPR_PATH@" \
|
"@HOME_MANAGER_EXPR_PATH@" \
|
||||||
--argstr modulesPath "$HOME/.nixpkgs/home-manager/modules" \
|
--argstr modulesPath "$HOME/.nixpkgs/home-manager/modules" \
|
||||||
--argstr confPath "$1" \
|
--argstr confPath "$confFile" \
|
||||||
-A activation-script \
|
-A activation-script \
|
||||||
-o "$wrkdir/activate"
|
-o "$wrkdir/activate"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue