You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the path nixos-config is set with the just the -I option, it is not picked up by nix. However, if you remove the hyphen (and adjust accordingly in nixos/default.nix), the path is picked up correctly. Look here:
$ echo '(import <nixos> {}).system' | NIX_PATH= NIXOS_CONFIG= nix-instantiate -I ~/nixos -I nixos-config=~/nixos/configuration.nix -
error: user-thrown exception: file `nixos-config' was not found in the Nix search path (add it using $NIX_PATH or -I)
(use `--show-trace' to show detailed location information)
$ sed -i 's/nixos-config/nixosconfig/' ~/nixos/nixos/default.nix
$ echo '(import <nixos> {}).system' | NIX_PATH= NIXOS_CONFIG= nix-instantiate -I ~/nixos -I nixosconfig=~/nixos/configuration.nix -
warning: you did not specify `--add-root'; the result might be removed by the garbage collector
/nix/store/c6gid7rpcfb5mm68qjaj2phd5llvwb2q-nixos-0.2pre-7d59a15-999480a.drv
I have not been able to reproduce this with a simpler example, so I guess there is some additional magic in the NixOS evaluation that triggers this.
Yes. I have no such file. And in the example above, I clear NIXOS_CONFIG. And just to be sure that the correct file is imported, I added an abort statement to ~/nixos/configuration.nix. Then I get:
$ echo '(import <nixos> {}).system' | NIX_PATH= NIXOS_CONFIG= nix-instantiate -I ~/nixos -I nixosconfig=~/nixos/configuration.nix -
error: evaluation aborted with the following error message: `ABORTING HERE'
Activity
edolstra commentedon Jan 24, 2013
Are you sure the second one isn't using /etc/nixos/configuration.nix?
rickynils commentedon Jan 24, 2013
Yes. I have no such file. And in the example above, I clear
NIXOS_CONFIG. And just to be sure that the correct file is imported, I added an abort statement to~/nixos/configuration.nix. Then I get:edolstra commentedon Jan 24, 2013
Oh wait, I didn't see the sed command...
edolstra commentedon Feb 26, 2013
Hm, I'm unable to reproduce this...
rickynils commentedon Feb 26, 2013
Neither can I, anymore. I'll close this issue.
Merge pull request NixOS#89 from DeterminateSystems/flakehub-inputs
nix: extract LegacyEvalArgs base for legacy CLI entry points
doc/inventory: record 30 candidates landed across the four cleanup sh…
nix: extract LegacyEvalArgs base for legacy CLI entry points
doc/inventory: Batch A — strike off branch-correctness amends
doc/inventory: Batch B — strike off doc-branch corrections
nix: extract LegacyEvalArgs base for legacy CLI entry points