FAQ: Difference between revisions

imported>Cillianderoiste
How can I install a proprietary or unfree package?: update the path to nixpkgs/config.nix
imported>Cillianderoiste
Line 295: Line 295:
== How can I install a proprietary or unfree package? ==
== How can I install a proprietary or unfree package? ==


If you want to install an unfree package as a user, then you need to enable it in ''~/.config/nixpkgs/config.nix'':
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'':


<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
Line 303: Line 303:
}
}
</syntaxhighlight>
</syntaxhighlight>
If you want to enable unfree packages system-wide, then set in your <code>/etc/nixos/configuration.nix</code>:
If you want to enable unfree packages system-wide, then set in your <code>/etc/nixos/configuration.nix</code>:


Line 311: Line 312:
}
}
</syntaxhighlight>
</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.
For temporary allowing unfree packages you can set the environment variable ''NIXPKGS_ALLOW_UNFREE'', e.g.