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

The Nix daemon needs to have NIX_REMOTE unset, or it'll loop infinitely #60

Open
MagicRB opened this issue Dec 27, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@MagicRB
Copy link
Collaborator

MagicRB commented Dec 27, 2024

In the nix module the environment variable NIX_REMOTE is set globally to daemon, which means that when running under dinit which properly inherits environment variables, the Nix daemon process itself will be running with NIX_REMOTE=daemon which causes an infinite loop of the daemon trying to connect to itself. The environment variable needs to be unset, such as below:

  export NIX_DAEMON=

or even better

  unset NIX_DAEMON

though I haven't tested the second one yet.

To reproduce make a container with dinit and nix.enable = true, nix.daemon = true then run the following commandS

  nix-build '<nixpkgs>' -A hello
@MagicRB MagicRB self-assigned this Dec 27, 2024
@MagicRB MagicRB added bug Something isn't working good first issue Good for newcomers labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant