Esta pergunta da FAQ do NixOS me ajudou:
How can I install a proprietary or unfree package?
You won't be able to install or search for an unfree package as a user, unless you explicitly enable it in ~/.config/nixpkgs/config.nix (the file and folder may need to be created):
{ # [...] allowUnfree = true; }When using NixOS, it is possible to enable unfree packages system-wide, then set in your
/etc/nixos/configuration.nix
:{ # [...] nixpkgs.config.allowUnfree = true; }Note that this alone will not allow you to search for or install packages with nix-env.
For temporary allowing unfree packages you can set the environment variable NIXPKGS_ALLOW_UNFREE, e.g.
NIXPKGS_ALLOW_UNFREE=1 nix-envNote that we are not able to test or build unfree software on Hydra due to policy. Most unfree licenses prohibit us from either executing or distributing the software.
Do console com nix-env
:
$ NIXPKGS_ALLOW_UNFREE=1 nix-env -qa | grep google-chrome
google-chrome-63.0.3239.132
google-chrome-beta-64.0.3282.71
google-chrome-dev-65.0.3311.3
" Capítulo 6. Configuração global " do manual do NixPkgs é ainda melhor mais fundo nos detalhes.
Eu achei o rehno-lindeque / NixSetup.md extremamente útil com toneladas de recursos extras e comentários.