Nix (package manager): Difference between revisions

m Nix store: typo
Tags: Mobile edit Mobile web edit
Klinger (talk | contribs)
m Focus on NixOS, and assumed that Nix 2.0 is used by most people now, so reordered the information. Home-Manager is not used outside Nixos (this is misleading), its used as addition to nixos in cases the nix-options arent enough.
Line 5: Line 5:


=== Installation ===
=== Installation ===
NixOS: Nix is being installed while NixOS is being installed.


The [https://nixos.org/manual/nix/stable/installation/ installation section of the Nix manual] describes the installation of standalone Nix from binary or source for Linux and Mac systems.
If you intend to utilize Nix on a different Linux distribution or a Mac computer, you can perform a standalone installation:  The [https://nixos.org/manual/nix/stable/installation/ installation section of the Nix manual] describes the installation of standalone Nix from binary or source.


=== Nix commands ===
=== Nix commands ===


Since Nix 2.0 there is a new style of commands. Those are [https://nixos.org/manual/nix/stable/command-ref/experimental-commands.html documented in the Nix reference manual]. See [[Nix command]] for additional information.
The [[Nix command|Nix commands]] are documented in the [https://nixos.org/manual/nix/stable/command-ref/experimental-commands.html Nix reference manual]. Prior to version 2.0 (February 2018) there have been different commands.  


=== Configuration ===
=== Configuration ===
Line 17: Line 18:
Standalone Nix is configured through <code>nix.conf</code> (usually found in <code>/etc/nix/</code>), which defines a number of settings relating to evaluation, builds, garbage collection, sandboxing, and user permissions. Details on the available options are [https://nixos.org/manual/nix/stable/command-ref/conf-file found in the Nix reference manual].  
Standalone Nix is configured through <code>nix.conf</code> (usually found in <code>/etc/nix/</code>), which defines a number of settings relating to evaluation, builds, garbage collection, sandboxing, and user permissions. Details on the available options are [https://nixos.org/manual/nix/stable/command-ref/conf-file found in the Nix reference manual].  


Outside of NixOS, [[Home Manager]] is the preferred way to manage declarative environments for a single user. For system-wide configuration on Linux, use [https://github.com/numtide/system-manager System Manager]. For system-wide configuration on macOS, [https://github.com/LnL7/nix-darwin nix-darwin] is the preferred solution.   
Even further configuration is possible with [[Home Manager]] to manage declarative environments for a single user. For system-wide configuration on Linux, you can use [https://github.com/numtide/system-manager System Manager]. For system-wide configuration on macOS, [https://github.com/LnL7/nix-darwin nix-darwin] is the preferred solution.   


== Internals ==
== Internals ==