`exec sudo --preserve-env` (needed to carry the NOMARCHY_* vars) also drags the live session user's HOME=/home/nomarchy into the root install process. Root-run `nix build` then writes an eval cache + .nix-defexpr there, and the in-chroot one lands on the TARGET as a stray, orphaned /home/nomarchy (no such user on the installed system). Pin root's own HOME after the sudo re-exec, and again inside the nixos-enter chroot script. The user activation already sets HOME=/home/$USERNAME and is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
30 KiB
30 KiB