mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00: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
|
||||
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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue