Adding programs to PATH: Difference between revisions

Axka (talk | contribs)
Add initial version of guide page for adding packages to PATH.
Tags: Mobile edit Mobile web edit Visual edit
 
Axka (talk | contribs)
m Clarify udev paragraph
Tags: Mobile edit Mobile web edit Visual edit
Line 1: Line 1:
Here is a collection of methods to add a program to the <code>PATH</code> environment variable with [[Nix (package manager)]] with packages from [[Nixpkgs]].
Here is a collection of methods to add a program to the <code>PATH</code> environment variable with [[Nix (package manager)]] with packages from [[Nixpkgs]].


Only the NixOS and system-wide profiles (on NixOS) support installing [[udev]] rules and system-wide [[systemd]] units.
The NixOS method supports installing [[udev]] rules, which may be required for programs interacting with hardware. Services should be enabled and configured with NixOS options rather than by adding them manually to <code>environment.systemPackages</code>.


Here we are using the package <code>hello</code> as an example. Unless stated otherwise, package attribute names (with necessary prefixes like <code>nixpkgs\#</code> or <code>pkgs.</code>) can be repeated to add more packages.
Here we are using the package <code>hello</code> as an example. Unless stated otherwise, package attribute names (with necessary prefixes like <code>nixpkgs\#</code> or <code>pkgs.</code>) can be repeated to add more packages.