NixOS: Difference between revisions
imported>Ixxie No edit summary |
imported>Ixxie |
||
Line 151: | Line 151: | ||
=== Usage of the Nix store === | === Usage of the Nix store === | ||
A lot of confusion for newcomers arises from the fact that configuration is stored in the read-only <code>/nix/store</code> tree along with all the installed packages. This fact makes it impossible to manually edit system configuration; all configuration changes must be performed by editing the <code>/etc/nixos/configuration.nix</code> file and executing <code>nixos-rebuild switch</code>. NixOS provides the [[NixOS Modules System|modules system]] for editing all required configurations. Users should first [https://nixos.org/nixos/options.html# check if | A lot of confusion for newcomers arises from the fact that configuration is stored in the read-only <code>/nix/store</code> tree along with all the installed packages. This fact makes it impossible to manually edit system configuration; all configuration changes must be performed by editing the <code>/etc/nixos/configuration.nix</code> file and executing <code>nixos-rebuild switch</code>. NixOS provides the [[NixOS Modules System|modules system]] for editing all required configurations. Users should first use [https://nixos.org/nixos/options.html# the option search tool] to check if the option they need exists before attempting to manually add files or configuration via low-level NixOS features like activation scripts. | ||
The system purity makes it possible to keep system configuration in a central place, without the need to edit multiple files. This configuration can be distributed or version controlled as desired. It also provides for determinism; if you provide the same inputs, the same version of Nixpkgs and the same <code>/etc/nixos/configuration.nix</code> you will get the exact same system state. | The system purity makes it possible to keep system configuration in a central place, without the need to edit multiple files. This configuration can be distributed or version controlled as desired. It also provides for determinism; if you provide the same inputs, the same version of Nixpkgs and the same <code>/etc/nixos/configuration.nix</code> you will get the exact same system state. |