Search code examples
nixnixpkgs

Configure location of ~/.config/nixpkgs/config.nix


Is there some envvar or similar that I can use to configure the location of ~/.config/nixpkgs/config.nix ?


Solution

  • 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.