Home Explore Blog CI



nixpkgs

nixos/doc/manual/configuration/config-syntax.chapter.md
98c831090ef8c800086fa2b3ef42782b2267378a558ba11d000000030000031f
# 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
```

Chunks
268ebf9c (1st chunk of `nixos/doc/manual/configuration/config-syntax.chapter.md`)
Title: Configuration Syntax
Summary
The NixOS configuration file, located at `/etc/nixos/configuration.nix`, is a Nix expression. Nix is a purely functional language used by the Nix package manager for building packages and configurations. This allows for abstraction and management of complex systems. The Nix manual provides a full description of the language, but this section will give a short overview of the most important constructs useful in NixOS configuration files.