[Nix-dev] Temporarily not using ~/.nixpkgs/config.nix
Eike
eike at eknet.org
Sun Mar 26 18:03:00 CEST 2017
Oh, thank you! and sorry for not doing the grep myself… :/
Linus Heckemann <acc at sphalerite.org> writes:
> On 26/03/17 16:30, Eike wrote:
>> Is there a way to temporarily disable evaluating ~/.nixpkgs/config.nix?
>> I looked at http://nixos.org/nixpkgs/manual/#chap-packageconfig, but
>> couldn't find anything related.
>
> See pkgs/top-level/impure.nix (found by grepping nixpkgs for
> .nixpkgs/config.nix):
>
>> config ? let
>> configFile = getEnv "NIXPKGS_CONFIG";
>> configFile2 = homeDir + "/.config/nixpkgs/config.nix";
>> configFile3 = homeDir + "/.nixpkgs/config.nix"; # obsolete
>> in
>> if configFile != "" && pathExists configFile then import configFile
>> else if homeDir != "" && pathExists configFile2 then import configFile2
>> else if homeDir != "" && pathExists configFile3 then import configFile3
>> else {}
>
> If you set the environment variable NIXPKGS_CONFIG to point to a file
> containing simply {} that should hopefully help.
>
> Linus
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
--
gpg: AD7AC35E
finger print: 137F BB0B 1639 D25F DC5D E59C B412 C5F5 AD7A C35E
More information about the nix-dev
mailing list