2.26.2 does not correctly add ~/.nix-profile to $PATH on foreign distribution
Describe the bug
Bug firstly discovered by Austin at ArchLinux:
The
2.26.2-1build ofnixdoes not correctly install itsprofile.dscripts into/etc/profile.d, leading to~/.nix-profilenot being automatically added to$PATHfor 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
- Update from
2.24.11-11->2.26.2-1 - Reboot/Log Out to start a new shell
- Observe
~/.nix-profilenot being on$PATHandnix-managedprograms 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
- [x] checked latest Nix manual (source)
- [x] checked open bug issues and pull requests for possible duplicates
Add :+1: to issues you find important.
Looks like this is being worked in the PKGBUILD. Is there anything needed from us? Looks like a valid bug to be fixed.
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