switch
Activate a NixOS or Home Manager configuration with rollback support, providing a structured summary of changes and optional validation 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 |
|---|---|---|---|
| flake_uri | No | ||
| mode | No | nixos | |
| validate | No | ||
| full_log | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||