Unfree software: Difference between revisions

Frontear (talk | contribs)
rewrite this page with better formatting
Frontear (talk | contribs)
m remove bit about tips and tricks
Line 25: Line 25:
=== For Nix CLI ===
=== For Nix CLI ===
As you may have noticed, the above configuration does not apply globally to your NixOS system (and is not applicable for non-NixOS users). Instead, you can configure Nixpkgs at a user level by writing your configuration in <code>~/.config/nixpkgs/config.nix</code>.
As you may have noticed, the above configuration does not apply globally to your NixOS system (and is not applicable for non-NixOS users). Instead, you can configure Nixpkgs at a user level by writing your configuration in <code>~/.config/nixpkgs/config.nix</code>.
{{Note|This file is ignored using nix3 commands, which internally leverage flakes and/or the flake registry. See Tips and Tricks for an alternative.}}{{file|~/.config/nixpkgs/config.nix|nix|3={
{{Note|This file is ignored using nix3 commands, leaving you with the environment variable technique as the easiest resort.}}{{file|~/.config/nixpkgs/config.nix|nix|3={
   allowUnfree = true;
   allowUnfree = true;
<nowiki>}</nowiki>}}You can alternatively set the environment variable <code>NIXPKGS_ALLOW_UNFREE=1</code>, which is automatically picked up by the Nix CLI. For newer nix3 commands, you will need to additionally pass <code>--impure</code>, otherwise the environment variable is ignored.<syntaxhighlight lang="bash">
<nowiki>}</nowiki>}}You can alternatively set the environment variable <code>NIXPKGS_ALLOW_UNFREE=1</code>, which is automatically picked up by the Nix CLI. For newer nix3 commands, you will need to additionally pass <code>--impure</code>, otherwise the environment variable is ignored.<syntaxhighlight lang="bash">