nixpkgs configuration The Nix package manager can be configured to allow or deny certain package sets. At this moment, packages can either be allowed to be installed or denied to be installed based on their license. Allow packages that do not have a free license by setting nixpkgs.config.allowUnfree = true; or deny them by setting it to false. This can also be achieved for one call to the Nix package manager by setting the environment variable: export NIXPKGS_ALLOW_UNFREE=1 Whenever unfree packages are not allowed, single packages can still be allowed by a predicate: nixpkgs.config.allowUnfreePredicate = (x: ...); Whenever unfree packages are not allowed, packages can still be whitelisted by their license: nixpkgs.config.whitelistedLicenses = with stdenv.lib.licenses; [ amd wtfpl ]; In addition to whitelisting licenses which are denied by the allowUnfree setting, you can also explicitely deny installation of packages which have a certain license: nixpkgs.config.blacklistedLicenses = with stdenv.lib.licenses; [ agpl3 gpl3 ]; A complete list of licenses can be found in the file lib/licenses.nix of the nix package tree. To apply the configuration to the package manager, you have to emit the nixpkgs.config part from the upper listings. So a configuration with { allowUnfree = true; } in ~/.nixpkgs/config.nix will prevent the Nix package manager from installing unfree licensed packages. The configuration as listed applies for NixOS.