Describe the bug
When using nix run, the command does not use the nixConfig options declared in the flake.nix. nix build does read it accordingly.
For example when using nixConfig.extra-substituters with nix run the build process won't use the binary cache, but when using nix build it does.
Steps To Reproduce
- Execute
nix run github:AmitHalpert/contamination
- ^ binary cache is not used ^
- Execute
nix run github:AmitHalpert/contamination \ --option extra-substituters 'https://contamination.cachix.org/' \ --option extra-trusted-public-keys 'contamination.cachix.org-1:KmdW5xVF8ccKEb9tvK6qtEMW+lGa83seGgFyBOkeM/4='
- ^ binary is being used ^
- Execute
nix build github:AmitHalpert/contamination (binary cache is used and the options are prompted when running)
Expected behavior
When executing nix run on a flake with the nixConfig options set I expect nix run to read those options and use them accordingly.
nix-env --version output
nix-env (Nix) 2.7.0pre20220127_558c4ee
Describe the bug
When using
nix run, the command does not use thenixConfigoptions declared in the flake.nix.nix builddoes read it accordingly.For example when using
nixConfig.extra-substituterswithnix runthe build process won't use the binary cache, but when usingnix buildit does.Steps To Reproduce
nix run github:AmitHalpert/contaminationnix run github:AmitHalpert/contamination \ --option extra-substituters 'https://contamination.cachix.org/' \ --option extra-trusted-public-keys 'contamination.cachix.org-1:KmdW5xVF8ccKEb9tvK6qtEMW+lGa83seGgFyBOkeM/4='nix build github:AmitHalpert/contamination(binary cache is used and the options are prompted when running)Expected behavior
When executing
nix runon a flake with thenixConfigoptions set I expectnix runto read those options and use them accordingly.nix-env --versionoutputnix-env (Nix) 2.7.0pre20220127_558c4ee