switch
Activate NixOS or Home Manager configuration by running the switch command, recording rollback generation and summarizing changes. Optionally validate with a dry build before switching.
Instructions
Activate the configuration (sudo nixos-rebuild switch / home-manager switch). Records rollback_generation first. Returns a structured 'summary' (units changed, derivations built) plus gen before/after; on success the raw log is trimmed to a tail (pass full_log=True for all of it). No implicit validation by default; pass validate=True to gate on check('dry-build') first. On a sudo auth failure returns a 'privilege' diagnosis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | nixos | |
| full_log | No | ||
| validate | No | ||
| flake_uri | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||