Is there some envvar or similar that I can use to configure the location of ~/.config/nixpkgs/config.nix ?
Asked
Active
Viewed 809 times
1 Answers
2
Yes, the default Nixpkgs config file location can be set with NIXPKGS_CONFIG
.
This will not affect invocations of Nixpkgs where the config
parameter is set, such as
import <nixpkgs> { config = ...; }
or invocations of Nixpkgs by NixOS.

Robert Hensing
- 6,708
- 18
- 23
-
There are also (at least) 2 open issues discussing `NIXPKS_CONFIG`'s currently undocumented status: [Nixpkgs#28085](https://github.com/NixOS/nixpkgs/issues/28085), [Nix#829](https://github.com/NixOS/nix/issues/829). (It is also [set by default on NixOS](https://github.com/NixOS/nixpkgs/blob/dd050270c78a0e214ed7cb9e25bae43b45406473/nixos/modules/programs/environment.nix#L20).) – toraritte Oct 25 '19 at 02:27