cachix / install-nix-action

Installs Nix on GitHub Actions for the supported platforms: Linux and macOS.
Apache License 2.0
498 stars 78 forks source link

`nix_path` not applied on hosted runners #188

Open zupo opened 11 months ago

zupo commented 11 months ago

On hosted runners the nix_path config does not seem to be applied.

I am running exactly the same steps on hosted and standard runners (ubuntu-latest), and hosted runners print out this every time I call nix-shell:

Run nix-shell --run "echo 'nix-shell successfully entered'"
error:
       … while calling the 'import' builtin

         at «string»:1:2:

            1| (import <nixpkgs> {}).bashInteractive
             |  ^

       … while calling the 'findFile' builtin

         at «string»:1:9:

            1| (import <nixpkgs> {}).bashInteractive
             |         ^

       error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
domenkozar commented 10 months ago

In such situations we'd need to set the config if we don't install Nix.