Jump to content

Unfree software: Difference between revisions

m
Adds titles to this FAQ entry.
imported>Srhb
m (system-wide is confusing, refer to environment.systemPackages)
imported>Samueldr
m (Adds titles to this FAQ entry.)
Line 1: Line 1:
{{FAQ/breadcrumb}}{{#tweekihide:firstHeading}}<onlyinclude>
{{FAQ/breadcrumb}}{{#tweekihide:firstHeading}}<onlyinclude>
== How can I install a proprietary or unfree package? ==
== How can I install a proprietary or unfree package? ==
=== Configuration for a user ===


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):
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):
Line 10: Line 12:
}
}
</syntaxhighlight>
</syntaxhighlight>
=== System-level configuration (NixOS) ===


When using NixOS, it is possible to enable unfree for eg. <code>environment.systemPackages</code> with the following  setting in your <code>/etc/nixos/configuration.nix</code>:
When using NixOS, it is possible to enable unfree for eg. <code>environment.systemPackages</code> with the following  setting in your <code>/etc/nixos/configuration.nix</code>:
Line 19: Line 23:
}
}
</syntaxhighlight>
</syntaxhighlight>
'''Note that this alone will not allow you to search for or install packages with nix-env.'''
'''Note that this alone will not allow you to search for or install packages with nix-env.''' See the previous section.
 
=== Temporary allowing ===


For temporary allowing unfree packages you can set the environment variable ''NIXPKGS_ALLOW_UNFREE'', e.g.
For temporary allowing unfree packages you can set the environment variable ''NIXPKGS_ALLOW_UNFREE'', e.g.


<syntaxhighlight lang="bash">NIXPKGS_ALLOW_UNFREE=1 nix-env</syntaxhighlight>
<syntaxhighlight lang="bash">NIXPKGS_ALLOW_UNFREE=1 nix-env</syntaxhighlight>
=== More precision ===


For whitelisting '''only specific''' unfree packages or unfree licenses
For whitelisting '''only specific''' unfree packages or unfree licenses
Anonymous user