Home Explore Blog Models CI



nixpkgs

pkgs/by-name/sw/switch-to-configuration-ng/README.md
154c764cfac5cf418a9efdad6bbb1c38a45ece8c912eaab4000000030000027f
# switch-to-configuration-ng

This program implements the switching/updating of NixOS systems. It starts with the existing running configuration at `/run/current-system` and handles the migration to a new configuration, built from a NixOS configuration's `config.system.build.toplevel` derivation.

For more information on what happens during a switch, see [what-happens-during-a-system-switch](../../../../nixos/doc/manual/development/what-happens-during-a-system-switch.chapter.md).

## Build in a devshell

```
cd ./pkgs/by-name/sw/switch-to-configuration-ng
nix-shell ../../../.. -A switch-to-configuration-ng
cd ./src
cargo build
```

Chunks
ef3464c4 (1st chunk of `pkgs/by-name/sw/switch-to-configuration-ng/README.md`)
Title: NixOS System Switching Program: switch-to-configuration-ng
Summary
This document introduces `switch-to-configuration-ng`, a program designed for updating and switching NixOS systems. It manages the migration from the currently running configuration (located at `/run/current-system`) to a new configuration derived from `config.system.build.toplevel`. The text also provides a reference for further details on the system switching process and includes instructions for building the program within a devshell using `nix-shell` and `cargo build`.