NixOS is a particular case of a desired state system: the OS is the mutable imperative layer, the config file is the desired state, and nix-build is the reconciliation step.