NixOS: Difference between revisions

imported>Ixxie
imported>Ixxie
Line 10: Line 10:


One of NixOS's most distinguishing features is the ability to ''declaratively configure'' the whole system. This is done by specifying a configuration file which defines which packages are installed on the system, which services to run and various other settings and options. This file is normally called <code>configuration.nix</code> and is found by default at <code>/etc/nixos</code>, although another location can be set using the environment variable <code>NIX_PATH</code>. The system configuration is then built with the command <code>nixos-rebuild</code>. The official website has search tools for browsing the available [https://nixos.org/nixos/options.html# configuration options] and [https://nixos.org/nixos/packages.html packages] (with the exception of proprietary packages).
One of NixOS's most distinguishing features is the ability to ''declaratively configure'' the whole system. This is done by specifying a configuration file which defines which packages are installed on the system, which services to run and various other settings and options. This file is normally called <code>configuration.nix</code> and is found by default at <code>/etc/nixos</code>, although another location can be set using the environment variable <code>NIX_PATH</code>. The system configuration is then built with the command <code>nixos-rebuild</code>. The official website has search tools for browsing the available [https://nixos.org/nixos/options.html# configuration options] and [https://nixos.org/nixos/packages.html packages] (with the exception of proprietary packages).


The following is an example of a <code>configuration.nix</code> file:
The following is an example of a <code>configuration.nix</code> file: