nix
nix copied to clipboard
AD (active directory) NIX_USER_PROFILE_DIR uses user name, but actual dir is user id number
On Ubuntu 18.04, with sssd setup and joined to an AD domain, after a multi-user nix install, the environment has:
NIX_USER_PROFILE_DIR=/nix/var/nix/profiles/per-user/<user>@<domain>
but
actual dir that exists is /nix/var/nix/profiles/per-user/<user_id_number>
Workaround that seems to work so far:
sudo mv /nix/var/nix/profiles/per-user/<user_id_number> /nix/var/nix/profiles/per-user/<user>@<domain>
The nix profile depends on the USER
environment variable. What output do you get for echo $USER
and id
?
FYI, NIX_USER_PROFILE_DIR
was recently removed (1c3ccba0f5e658fa5d593ddef8aaaf6728f945a5).
The nix profile depends on the
USER
environment variable. What output do you get forecho $USER
andid
?
echo $USER
<user>@<domain>
Which is consistent with the problem I've described. Perhaps the installer uses a different way to decide what to name the user directory.
FYI,
NIX_USER_PROFILE_DIR
was recently removed (1c3ccba).
$ nix-env --version
nix-env (Nix) 2.3.1
I marked this as stale due to inactivity. → More info
While the environment variable is gone now, the source of the issue is not. See #4565 and #2757
This still seems to be an issue.