Chapter 5. ~/.nixpkgs/config.nix: global configuration

Nix packages can be configured to allow or deny certain options.

To apply the configuration edit ~/.nixpkgs/config.nix and set it like

{
  allowUnfree = true;
}

and will allow the Nix package manager to install unfree licensed packages.

The configuration as listed also applies to NixOS under nixpkgs.config set.

A complete list of licenses can be found in the file lib/licenses.nix of the nix package tree.

You can define a function called packageOverrides in your local ~/.nixpkgs/config.nix to overide nix packages. It must be a function that takes pkgs as an argument and return modified set of packages.

{
  packageOverrides = pkgs: rec {
    foo = pkgs.foo.override { ... };
  };
}