Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-daemon doesn't have access to nix binaries in non-NixOS multi-user installation #4902

Open
flokli opened this issue Jun 10, 2021 · 4 comments
Labels

Comments

@flokli
Copy link
Contributor

flokli commented Jun 10, 2021

Describe the bug

When installing Nix on a non-NixOS system (in multi-user mode, which is the default now), the nix-daemon doesn't have the nix* binaries in $PATH.

This is somewhat unintuitive/inconsistent, as nix.package gets added to $PATH on NixOS, and it just works there, but fails for example when using Nix on non-NixOS (like in a GitHub Action)

Steps To Reproduce

  1. Install Nix on non-NixOS via the official installer
  2. Configure a post-build-hook via nix.conf
  3. In the post-build-hook, invoke a nix binary (like nix copy as per https://www.tweag.io/blog/2019-11-21-untrusted-ci/)
  4. Nix is unable to invoke these binaries

Expected behavior

nix-daemon has its tooling in $PATH.

nix-env --version output
2.3.12, as per

      - uses: cachix/install-nix-action@v13

Additional context

Originally reported as cachix/install-nix-action#82, but it's not limited to the install-nix-action itself, and the case in everything using the installer on non-NixOS.

@abathur
Copy link
Member

abathur commented Jun 11, 2021

(in multi-user mode, which is the default now)

Probably doesn't alter the issue any, but adding errata for posterity:

@flokli
Copy link
Contributor Author

flokli commented Jun 16, 2021

True, cachix configures the installer to multi-user. I assume the problem is also present on MacOS, even though I didn't explicitly check for it.

@stale
Copy link

stale bot commented Jan 3, 2022

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

@stale stale bot added the stale label Jan 3, 2022
@adrian-gierakowski
Copy link

@stale stale bot removed the stale label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants