feat: use nh to keep 2 gens and to deploy builds

This commit is contained in:
Jet Pham 2026-02-26 20:01:40 -08:00
parent 791e33478f
commit 978dc11d37
No known key found for this signature in database
4 changed files with 18 additions and 3 deletions

View file

@ -40,14 +40,14 @@ nix run github:nix-community/nixos-anywhere -- --store-paths \
```
### 3. Update Existing Server (No Wipe)
Once the server is running NixOS, use `nixos-rebuild` to push updates. This is faster and doesn't wipe data.
Once the server is running NixOS, use `nh` to push updates. This repository provides `nh` via `direnv` (loaded from `flake.nix` devShell), so just run `direnv allow` first.
```bash
# Update via IP
nixos-rebuild switch --flake path:.#extremist-software --target-host root@<TARGET_IP> --impure
nh os switch --hostname extremist-software --target-host root@<TARGET_IP> --impure path:.
# Update via Tailscale (Once tailored up)
nixos-rebuild switch --flake path:.#extremist-software --target-host root@extremist-software --impure
nh os switch --hostname extremist-software --target-host root@extremist-software --impure path:.
```
repo uses `impure` build to load `secrets/secrets.nix` directly. no encrypted secrets in git.