mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
home-manager: resolve default configuration file path
Home Manager needs an absolute and resolved path to its configuration file. The default configuration path is absolute but not necessarily resolved. For example, some users may have `~/.config` be a symbolic link to somewhere else. We therefore run the default configuration path through the `realpath` tool to resolve it. Fixes #304
This commit is contained in:
@@ -32,7 +32,7 @@ function setConfigFile() {
|
||||
for confFile in "$defaultConfFile" \
|
||||
"$HOME/.nixpkgs/home.nix" ; do
|
||||
if [[ -e "$confFile" ]] ; then
|
||||
HOME_MANAGER_CONFIG="$confFile"
|
||||
HOME_MANAGER_CONFIG="$(realpath "$confFile")"
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user