feat: add one-command laptop configuration sync

This commit is contained in:
OpenAI Coding Assistant
2026-09-05 23:36:28 -05:00
parent f509079c33
commit 209f4d8bda
2 changed files with 58 additions and 0 deletions
+14
View File
@@ -90,6 +90,20 @@ These are system-owned executables from Nix, not unmanaged `npm -g`, `pip instal
## Build and apply
### One-command sync on this laptop
Save your work, then run from any directory (it requests sudo when needed):
```sh
/etc/nix/switch-system.sh # apply now and make it the boot default
/etc/nix/switch-system.sh dry-activate # build and preview changes without applying
/etc/nix/switch-system.sh boot # stage for the next boot instead
```
This builds the current **`/etc/nix#nixos`** checkout and activates that exact output, including `dev`'s Home Manager configuration. It shares the automatic updater's lock, stops on build failure, keeps recovery generations and never reboots. It does **not** pull remote Git changes or update `flake.lock`: “latest” here means the files currently checked out in `/etc/nix`. New source files must be added to Git to be included. Open a new terminal afterward for shell environment changes; some desktop changes require a fresh login. `--help` lists the modes, including temporary `test` activation.
### Detailed validation and activation
On the **physical laptop**, from an administrator shell:
```sh