nix icon indicating copy to clipboard operation
nix copied to clipboard

AD (active directory) NIX_USER_PROFILE_DIR uses user name, but actual dir is user id number

Open vertexcite opened this issue 5 years ago • 6 comments

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>

vertexcite avatar Dec 06 '19 03:12 vertexcite

The nix profile depends on the USER environment variable. What output do you get for echo $USER and id?

zimbatm avatar Dec 06 '19 11:12 zimbatm

FYI, NIX_USER_PROFILE_DIR was recently removed (1c3ccba0f5e658fa5d593ddef8aaaf6728f945a5).

edolstra avatar Dec 06 '19 19:12 edolstra

The nix profile depends on the USER environment variable. What output do you get for echo $USER and id?

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

vertexcite avatar Dec 11 '19 04:12 vertexcite

I marked this as stale due to inactivity. → More info

stale[bot] avatar Feb 16 '21 07:02 stale[bot]

While the environment variable is gone now, the source of the issue is not. See #4565 and #2757

mtalexan avatar Jan 04 '22 22:01 mtalexan

This still seems to be an issue.

dylanmtaylor avatar Feb 23 '24 22:02 dylanmtaylor