2014-08-24 18:18:18 +01:00
|
|
|
|
<chapter xmlns="http://docbook.org/ns/docbook"
|
|
|
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
|
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
|
|
|
version="5.0"
|
|
|
|
|
xml:id="sec-configuration-syntax">
|
2018-05-02 00:57:09 +01:00
|
|
|
|
<title>Configuration Syntax</title>
|
|
|
|
|
<para>
|
2019-09-19 18:17:30 +01:00
|
|
|
|
The NixOS configuration file
|
|
|
|
|
<filename>/etc/nixos/configuration.nix</filename> is actually a <emphasis>Nix
|
|
|
|
|
expression</emphasis>, which is the Nix package manager’s purely functional
|
|
|
|
|
language for describing how to build packages and configurations. This means
|
|
|
|
|
you have all the expressive power of that language at your disposal,
|
|
|
|
|
including the ability to abstract over common patterns, which is very useful
|
|
|
|
|
when managing complex systems. The syntax and semantics of the Nix language
|
|
|
|
|
are fully described in the
|
|
|
|
|
<link
|
|
|
|
|
xlink:href="http://nixos.org/nix/manual/#chap-writing-nix-expressions">Nix
|
|
|
|
|
manual</link>, but here we give a short overview of the most important
|
|
|
|
|
constructs useful in NixOS configuration files.
|
2018-05-02 00:57:09 +01:00
|
|
|
|
</para>
|
|
|
|
|
<xi:include href="config-file.xml" />
|
|
|
|
|
<xi:include href="abstractions.xml" />
|
|
|
|
|
<xi:include href="modularity.xml" />
|
|
|
|
|
<xi:include href="summary.xml" />
|
2014-08-24 18:18:18 +01:00
|
|
|
|
</chapter>
|