|
|
(23 intermediate revisions by 9 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? ==
| |
|
| |
|
| === Configuration for a user ===
| | [https://nixos.org/manual/nixpkgs/stable/#sec-allow-unfree Nixpkgs manual on allowing unfree packages] |
|
| |
|
| 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):
| | [[Category:Software]] |
| | | [[Category:Nixpkgs]] |
| <syntaxhighlight lang="nix">
| |
| {
| |
| # [...]
| |
| allowUnfree = true;
| |
| }
| |
| </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>:
| |
| | |
| <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 without the user configured.''' See the previous section. No reboot is required for unfree to take effect, however you need to run <code>nixos-rebuild switch</code> just like for all other changes to your systems <code>configuration.nix</code>
| |
| | |
| === Temporary allowing ===
| |
| | |
| 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>
| |
| | |
| === More precision ===
| |
| | |
| 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>
| |