nix icon indicating copy to clipboard operation
nix copied to clipboard

2.26.2 does not correctly add ~/.nix-profile to $PATH on foreign distribution

Open PRESFIL opened this issue 9 months ago • 2 comments

Describe the bug

Bug firstly discovered by Austin at ArchLinux:

The 2.26.2-1 build of nix does not correctly install its profile.d scripts into /etc/profile.d, leading to ~/.nix-profile not being automatically added to $PATH for users.

I will add my five cents to explain. This is the contents of the 2.24.11 package:

.
├── etc
│   ├── nix
│   └── profile.d
└── usr
    ├── bin
    ├── include
    ├── lib
    └── share

And this is after the release 2.26.2:

.
└── usr
    ├── bin
    ├── etc
    │   └── profile.d
    ├── include
    ├── lib
    └── share

/etc/nix/ directory missing and /etc/profile.d directory moved to /usr/.

Steps To Reproduce

  1. Update from 2.24.11-11 -> 2.26.2-1
  2. Reboot/Log Out to start a new shell
  3. Observe ~/.nix-profile not being on $PATH and nix-managed programs are unavailable

Expected behavior

nix-*, nix and all software in ~/.nix-profile are available after login.

Metadata

  • unable to run

Additional context

  • package version(s): 2.26.2

Checklist


Add :+1: to issues you find important.

PRESFIL avatar Mar 09 '25 20:03 PRESFIL

Looks like this is being worked in the PKGBUILD. Is there anything needed from us? Looks like a valid bug to be fixed.

tomberek avatar Jun 04 '25 19:06 tomberek

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/2025-05-04-nix-team-meeting-minutes-230/65206/1

nixos-discourse avatar Jun 04 '25 22:06 nixos-discourse