What is the significance of the directory /etc/profiles/per-user/$USER? It doesn’t seem to exist on my NixOS system, but it’s added to $NIX_PROFILES (via the NixOS option environment.profiles) by the following code from nixos/modules/config/users-groups.nix in nixpkgs:

    environment.profiles = [

I don’t see any mention of it in the NixOS manual, nixpkgs manual, nix manual, nixpkgs source code, or nix source code (except the above snippet from the nixpkgs source code).

/etc/profiles/per-user/$USER get created when you configure per user packages.

     isNormalUser = true;
     packages = [ 

Maybe that should be documented somewhere, it’s quite automagical.

A unrelated bug to your questions that was fixed , thats also good for info/reference.

1 Like