Error using flox on nix on wsl without daemon

I am trying flox on a nix installation on wsl, but it is not using the nix daemon. I followed instruction on nonetheless:

$ flox --version
Version: 0.0.6-r43

$ cat ~/.config/nix/nix.conf
experimental-features = nix-command flakes
nix.settings.trusted-substituters = [ "" ];
nix.settings.trusted-public-keys = [ "flox-store-public-0:8c/B+kjIaQ+BloCmNkRUKwaVPFWkriSAd0JJvuDu4F0=" ];

$ flox activate
Updating /home/hellwolf/.config/flox/nix.conf
Updating /home/hellwolf/.config/flox/gitconfig
error: cannot connect to socket at '/nix/var/nix/daemon-socket/socket': No such file or directory
(use '--show-trace' to show detailed location information)

ERROR: could not verify defaultFlake URL: "github:flox/floxpkgs/master"

Thanks for the feedback - we’ve been developing exclusively in multi-user mode because it has several advantages, but you’re right that we’ve neglected to provide support for single-user mode. We’ll log an issue to improve this support, but in the meantime you should be able to work around the problem and use flox by explicitly setting the value of NIX_REMOTE in your environment.

Can you try these commands and let us know if that works for you?

export NIX_REMOTE=auto
flox activate

Many thanks.

Thank you!

That did fix it.

Thanks for confirming - yesterday I followed in your footsteps and similarly got flox working on WSL2 Ubuntu, albeit with a nonstandard installation. We’ll work on making that a smoother experience going forward. :+1:

FYI - the above should no longer need to be manually set in the next version of flox.
We are also actively working on improving and documenting the WSL installation.
All will be announced on discourse once available :slight_smile: