Home Explore Blog Models CI



nixpkgs

1st chunk of `nixos/doc/manual/configuration/config-syntax.chapter.md`
d04af65b285ab32e80fa02233c45c08332f87e370e133f95000000010000031f
# Configuration Syntax {#sec-configuration-syntax}

The NixOS configuration file `/etc/nixos/configuration.nix` is actually
a *Nix expression*, 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 [Nix
manual](https://nixos.org/nix/manual/#chap-writing-nix-expressions), but
here we give a short overview of the most important constructs useful in
NixOS configuration files.

```{=include=} sections
config-file.section.md
abstractions.section.md
modularity.section.md
```

Title: NixOS Configuration Syntax Overview
Summary
This section introduces the NixOS configuration file, `/etc/nixos/configuration.nix`, as a Nix expression. It explains that this means the configuration uses Nix's purely functional language, offering powerful abstraction capabilities for managing complex systems. The text refers to the Nix manual for a full description of the language, while promising a concise overview of key constructs relevant to NixOS configurations.