aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/justfile
diff options
context:
space:
mode:
Diffstat (limited to 'justfile')
-rw-r--r--justfile4
1 files changed, 4 insertions, 0 deletions
diff --git a/justfile b/justfile
index fa80823..8af74bb 100644
--- a/justfile
+++ b/justfile
@@ -30,6 +30,10 @@ nix-switch:
echo "nix not installed; skipping home-manager switch" >&2
exit 0
fi
+ # home-manager's activation script references $USER unconditionally;
+ # just runs recipes with a sanitized env that may drop it.
+ export USER="${USER:-$(id -un)}"
+ export HOME="${HOME:-$(getent passwd "$USER" | cut -d: -f6)}"
profile=host
[ -f /etc/os-release ] && . /etc/os-release || true
case "${ID:-}" in