Unfree software: Difference between revisions

From NixOS Wiki
imported>Srhb
m system-wide is confusing, refer to environment.systemPackages
Dander (talk | contribs)
link to nixpkgs manual instead of copying the content
 
(29 intermediate revisions by 12 users not shown)
Line 1: Line 1:
{{FAQ/breadcrumb}}{{#tweekihide:firstHeading}}<onlyinclude>
Unfree software refers to software that has restrictive licensing on modification and/or redistribution. This type of software cannot be freely provided or distributed in an official capacity, which means that unfree software is neither built by [[Hydra]], nor cached on the official [[Binary Cache|binary cache]]. Despite this, Nixpkgs offers a very large collection of unfree software as derivations, however they cannot be used by default without configuring Nixpkgs and opting in to unfree software usage.
== 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):
[https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree Nixpkgs manual on allowing unfree packages]


<syntaxhighlight lang="nix">
[[Category:Software]]
{
[[Category:Nixpkgs]]
  # [...]
  allowUnfree = true;
}
</syntaxhighlight>
 
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>:
 
<syntaxhighlight lang="nix">
{
  # [...]
  nixpkgs.config.allowUnfree = true;
}
</syntaxhighlight>
'''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.
 
<syntaxhighlight lang="bash">NIXPKGS_ALLOW_UNFREE=1 nix-env</syntaxhighlight>
 
For whitelisting '''only specific''' unfree packages or unfree licenses
see the [https://nixos.org/nixpkgs/manual/#sec-allow-unfree "Installing unfree packages" section]
of the Nixpkgs manual.
 
Note 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.
</onlyinclude>

Latest revision as of 22:25, 26 October 2024

Unfree software refers to software that has restrictive licensing on modification and/or redistribution. This type of software cannot be freely provided or distributed in an official capacity, which means that unfree software is neither built by Hydra, nor cached on the official binary cache. Despite this, Nixpkgs offers a very large collection of unfree software as derivations, however they cannot be used by default without configuring Nixpkgs and opting in to unfree software usage.

Nixpkgs manual on allowing unfree packages