Closed antoineco closed 2 weeks ago
I found out that this is actually by design. It is the responsibility of the user (or relevant module) to link the expected paths by extending environment.pathsToLink
.
See also https://github.com/NixOS/nixpkgs/issues/47173
Closing
Context of the issue
Below is a flake to reproduce the issue. Its sole purpose is to install the
nix-direnv
package as a user package, the rest is boilerplate.Note that the
nix-direnv
package only contains ashare/
directory:What happened
In the resulting nix-darwin system, the
share/nix-direnv/
directory was omitted:What was expected
nix-darwin behaves similarly to
nix profile
and does preserve theshare/
directory of thenix-direnv
package although it doesn't contain abin/
directory.Example:
Additional notes
A cursory inspection led me to this:
https://github.com/LnL7/nix-darwin/blob/9d7aebb3039fbfb93afebef53210e2999f8b7e1a/modules/users/default.nix#L193-L201
https://github.com/LnL7/nix-darwin/blob/9d7aebb3039fbfb93afebef53210e2999f8b7e1a/modules/environment/default.nix#L174-L178