From 82778b6deb12c624e60f38703f562d9de4c62758 Mon Sep 17 00:00:00 2001 From: Alexander Wainwright Date: Sat, 11 Apr 2026 19:55:17 +1000 Subject: [PATCH] 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 --- CLAUDE.md | 58 +++++++++++++++---------------------------------------- readme.md | 12 ++++++++++++ 2 files changed, 28 insertions(+), 42 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 8a4f278..8ca6778 100644 --- a/CLAUDE.md +++ b/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 .# -nix flake check -``` - -To deploy to a remote host: - -```bash -nixos-rebuild switch --flake . --target-host .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//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//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`) diff --git a/readme.md b/readme.md index e90ed4c..3d102d0 100644 --- a/readme.md +++ b/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 .local --sudo +``` + +# List generations + +``` +nixos-rebuild list-generations +``` + # Update and deploy From within this directory: