Jump to content

Unfree software: Difference between revisions

m
Tomodachi94 moved page Unfree Software to Unfree software: use sentance case
(Remove blank lines. Annoying.)
m (Tomodachi94 moved page Unfree Software to Unfree software: use sentance case)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Hydra does not test or build unfree software by policy. Most unfree licenses have restrictions on software distribution.
'''Unfree software''', sometimes called '''nonfree software''', is software that cannot be freely modified or distributed. [[Nixpkgs]] provides packages for unfree software, but additional configuration is required before they can be used.


=== Per-package (Ideal) ===
== Using unfree packages ==
This method works for both NixOS system level configuration and standalone [[Home manager]]:
=== Per-package (preferred) ===
This method works for both NixOS system level configuration and [[Home Manager]]:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{
{
   allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
   nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
     "vscode"
     "vscode"
   ];
   ];
Line 12: Line 13:


</nowiki>}}
</nowiki>}}
=== For all packages ===
=== For all packages ===


This method works for NixOS system-level configuration:
This method works for both NixOS system level configuration and [[Home Manager]]:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
Line 21: Line 23:
}
}
</nowiki>}}
</nowiki>}}
=== Command Line ===
 
=== Command line ===


You won't be able to install or search for an unfree package as a user unless you explicitly enable it:
You won't be able to install or search for an unfree package as a user unless you explicitly enable it:
Line 27: Line 30:
{{file|~/.config/nixpkgs/config.nix|nix|<nowiki>
{{file|~/.config/nixpkgs/config.nix|nix|<nowiki>
{
{
   nixpkgs.config.allowUnfree = true;
   allowUnfree = true;
}
}
</nowiki>}}
</nowiki>}}
=== Temporary allowing ===
 
=== Temporarily allowing ===


For temporary allowing unfree packages, you can use an environment variable:
For temporary allowing unfree packages, you can use an environment variable:
Line 41: Line 45:


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
$ NIXPKGS_ALLOW_UNFREE=1 nix run --impure "nixpkgs#vscode"
$ NIXPKGS_ALLOW_UNFREE=1 nix run nixpkgs#vscode --impure
</syntaxhighlight>
</syntaxhighlight>
=== See also ===


* [https://nixos.org/nixpkgs/manual/#sec-allow-unfree Nixpkgs manual#Installing unfree packages]
== Hydra ==
 
[[Hydra]] does not build unfree software, and unfree software is unavailable in <code>cache.nixos.org</code>.
 
== See also ==
 
* [https://nixos.org/nixpkgs/manual/#sec-allow-unfree Nixpkgs manual on allowing unfree packages]
 
[[Category:Software]]
134

edits