1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-02-17 05:35:06 +01:00

home-manager: set FLAKE_ARG with HOME_MANAGER_PATH

This commit is contained in:
usertam 2024-07-04 19:28:26 +08:00
parent 0a30138c69
commit d77315a418
No known key found for this signature in database
GPG key ID: C35F5FF3A6C5AC43

View file

@ -100,6 +100,10 @@ function setHomeManagerNixPath() {
local path="@HOME_MANAGER_PATH@"
if [[ -n "$path" ]] ; then
if [[ -e "$path/flake.nix" ]] ; then
# Set FLAKE_ARG if not set by --flake already
FLAKE_ARG=${FLAKE_ARG:-$path}
fi
if [[ -e "$path" || "$path" =~ ^https?:// ]] ; then
EXTRA_NIX_PATH+=("home-manager=$path")
return