docs: add remote deploy/list-generations to readme, tidy CLAUDE.md
Move deploy commands to readme.md. Update CLAUDE.md to reference readme for commands and reflect the core/base module split and current host list. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c30d442e7e
commit
82778b6deb
2 changed files with 28 additions and 42 deletions
58
CLAUDE.md
58
CLAUDE.md
|
|
@ -2,55 +2,26 @@
|
|||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Deploy
|
||||
|
||||
From within this directory:
|
||||
|
||||
```bash
|
||||
sudo nixos-rebuild switch --flake .
|
||||
```
|
||||
|
||||
To update flake inputs first:
|
||||
|
||||
```bash
|
||||
nix flake update
|
||||
sudo nixos-rebuild switch --flake .
|
||||
```
|
||||
|
||||
To build without switching (dry run / check):
|
||||
|
||||
```bash
|
||||
nixos-rebuild build --flake .#<hostname>
|
||||
nix flake check
|
||||
```
|
||||
|
||||
To deploy to a remote host:
|
||||
|
||||
```bash
|
||||
nixos-rebuild switch --flake . --target-host <hostname>.local --sudo
|
||||
```
|
||||
|
||||
To list generations:
|
||||
|
||||
```bash
|
||||
nixos-rebuild list-generations
|
||||
```
|
||||
See `readme.md` for deploy commands.
|
||||
|
||||
## Architecture
|
||||
|
||||
This is a NixOS flake repository managing 5 hosts with shared Home Manager configuration.
|
||||
This is a NixOS flake repository managing multiple hosts with shared Home Manager configuration.
|
||||
|
||||
**Entry point:** `flake.nix` — defines all host configurations via `nixosConfigurations`. A shared `mkHomeManagerConfig` helper wires Home Manager into each host. The `inputs` are passed as `specialArgs` so all modules can access them.
|
||||
|
||||
**Two layers of configuration:**
|
||||
**Three layers of system configuration:**
|
||||
|
||||
- `hosts/` — system-level (NixOS modules, hardware, services)
|
||||
- `hosts/modules/` — reusable system modules (`base.nix`, `desktop.nix`, `laptop.nix`, `server.nix`, `personal.nix`, `sway.nix`, `niri.nix`, etc.)
|
||||
- `hosts/<name>/configuration.nix` — host-specific config that imports from `hosts/modules/`
|
||||
- `hosts/modules/core.nix` — minimal layer: user, SSH, fish, nix flakes/gc, locale. Enough to SSH in and rebuild.
|
||||
- `hosts/modules/base.nix` — imports core + day-to-day tools: avahi, mosh, direnv, CLI tools, build toolchains.
|
||||
- `hosts/modules/desktop.nix`, `laptop.nix`, `personal.nix`, `sway.nix`, `niri.nix` — additional layers for GUI hosts.
|
||||
|
||||
- `alex/` — user-level (Home Manager modules)
|
||||
- `alex/core.nix` — base for all hosts (shell, git, tools, starship, fish, neovim)
|
||||
- `alex/desktop.nix`, `alex/personal.nix` — conditionally included per host
|
||||
- `hosts/<name>/configuration.nix` — host-specific config that imports from `hosts/modules/`
|
||||
|
||||
**User-level (Home Manager):**
|
||||
|
||||
- `alex/core.nix` — base for all hosts (shell, git, tools, starship, fish, neovim)
|
||||
- `alex/desktop.nix`, `alex/personal.nix` — conditionally included per host
|
||||
|
||||
**Hosts:**
|
||||
|
||||
|
|
@ -59,8 +30,11 @@ This is a NixOS flake repository managing 5 hosts with shared Home Manager confi
|
|||
| `case` | Laptop | WireGuard, ZeroTier, Syncthing, Sway/Niri |
|
||||
| `count` | Desktop | AMD GPU + ROCm, Ollama |
|
||||
| `armitage` | Laptop | systemd-boot, latest kernel |
|
||||
| `alt` | Proxmox LXC | Media server (Jellyfin, *arr stack, Caddy) |
|
||||
| `alt` | Proxmox LXC | Media server (Jellyfin, *arr stack) |
|
||||
| `nightcity` | Proxmox LXC | Minimal server |
|
||||
| `panam` | Proxmox LXC | Forgejo instance |
|
||||
| `wintermute` | Proxmox LXC | Reverse proxy (Caddy) |
|
||||
| `bootstrap` | Proxmox LXC | Minimal template for cloning new hosts |
|
||||
|
||||
**Theme:** Catppuccin Mocha (`alex/colours/catppuchin-mocha.nix`)
|
||||
|
||||
|
|
|
|||
12
readme.md
12
readme.md
|
|
@ -18,6 +18,18 @@ nmtui
|
|||
|
||||
Select "Activate a connection", pick your network, and enter the password.
|
||||
|
||||
# Remote deploy
|
||||
|
||||
```
|
||||
nixos-rebuild switch --flake . --target-host <hostname>.local --sudo
|
||||
```
|
||||
|
||||
# List generations
|
||||
|
||||
```
|
||||
nixos-rebuild list-generations
|
||||
```
|
||||
|
||||
# Update and deploy
|
||||
|
||||
From within this directory:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue