docs: update READMEs and .gitignore for the restructured layout
CI / flake (pull_request) Successful in 3m25s
CI / flake (pull_request) Successful in 3m25s
Point all path references at the new users/, home/, modules/, hosts/, lib/ locations, and document the user registry, the multi-user host model, and the portable homeConfigurations / homeModules outputs.
This commit is contained in:
@@ -8,21 +8,50 @@ single flake.
|
|||||||
Defined in the host table in [`flake.nix`](./flake.nix):
|
Defined in the host table in [`flake.nix`](./flake.nix):
|
||||||
|
|
||||||
| Configuration | System | Machine |
|
| Configuration | System | Machine |
|
||||||
| --------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
|
| --------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||||
| `lyrathorpe-mbp` | `aarch64-linux` | MacBook Pro (Apple Silicon, Asahi) |
|
| `lyrathorpe-mbp` | `aarch64-linux` | MacBook Pro (Apple Silicon, Asahi) |
|
||||||
| `lyrathorpe-t400` | `x86_64-linux` | ThinkPad T400 — [install notes](./system/machine/T400/README.md) |
|
| `lyrathorpe-t400` | `x86_64-linux` | ThinkPad T400 — [install notes](./hosts/T400/README.md) |
|
||||||
| `lyrathorpe-macpro31` | `x86_64-linux` | Mac Pro 3,1, desktop — [install notes](./system/machine/MacPro31/README.md) |
|
| `lyrathorpe-macpro31` | `x86_64-linux` | Mac Pro 3,1, desktop — [install notes](./hosts/MacPro31/README.md) |
|
||||||
| `emmathorpe-edaas` | `x86_64-linux` | Work WSL box (NixOS-WSL) |
|
| `emmathorpe-edaas` | `x86_64-linux` | Work WSL box (NixOS-WSL) |
|
||||||
| `lyrathorpe-rpi5` | `aarch64-linux` | Raspberry Pi 5 headless server: Docker host + nginx reverse proxy — [install notes](./system/machine/RPi5/README.md) |
|
| `lyrathorpe-rpi5` | `aarch64-linux` | Raspberry Pi 5 headless server: Docker host + nginx reverse proxy — [install notes](./hosts/RPi5/README.md) |
|
||||||
| `lyrathorpe-mac` | `aarch64-darwin` | macOS (nix-darwin) |
|
| `lyrathorpe-mac` | `aarch64-darwin` | macOS (nix-darwin) |
|
||||||
|
|
||||||
Shared layers: `lyrathorpe/home` (home-manager: shell, git, editor),
|
Shared layers: `home` (home-manager: shell, git, editor),
|
||||||
`system/modules/common-nixos.nix` (all NixOS hosts: fonts, nix-ld, caches),
|
`modules/common-nixos.nix` (all NixOS hosts: fonts, nix-ld, caches),
|
||||||
`system/modules/workstation.nix` (physical graphical hosts: audio, thermald,
|
`modules/workstation.nix` (physical graphical hosts: audio, thermald,
|
||||||
earlyoom, fwupd), `system/modules/laptop.nix` (laptops: Wi-Fi, Bluetooth, power,
|
earlyoom, fwupd), `modules/laptop.nix` (laptops: Wi-Fi, Bluetooth, power,
|
||||||
lid), and `system/modules/ssh.nix` (key-only sshd). The x86 hosts also pull
|
lid), and `modules/ssh.nix` (key-only sshd). The x86 hosts also pull
|
||||||
`nixos-hardware` profiles.
|
`nixos-hardware` profiles.
|
||||||
|
|
||||||
|
## Users
|
||||||
|
|
||||||
|
Identity is data, kept separate from the reusable modules:
|
||||||
|
|
||||||
|
- [`users/registry.nix`](./users/registry.nix) — one entry per user (display
|
||||||
|
name, email, supplementary groups, authorized + signing keys). This is the
|
||||||
|
single source of identity; no user data is hardcoded in the modules.
|
||||||
|
- Each host's table entry declares a `users` set keyed by username; every entry
|
||||||
|
lists that user's home-module composition (the shared `./home` bundle plus any
|
||||||
|
per-user modules, e.g. [`users/emmathorpe/work.nix`](./users/emmathorpe/work.nix))
|
||||||
|
and optional per-host-user system bits such as `linger`.
|
||||||
|
- `mkHost` builds each account from the registry and injects the matching
|
||||||
|
identity into that user's home config as the `identity` module arg. A host can
|
||||||
|
therefore declare any number of users.
|
||||||
|
|
||||||
|
### Portable home (off-NixOS / external consumers)
|
||||||
|
|
||||||
|
The home config is also exposed for use beyond these hosts:
|
||||||
|
|
||||||
|
- `homeConfigurations."<user>@<system>"` — a standalone home-manager profile
|
||||||
|
(the portable subset: shell + git + editor + claude) that can be activated on a
|
||||||
|
machine this flake does **not** manage:
|
||||||
|
`home-manager switch --flake .#"lyrathorpe@x86_64-linux"`. The desktop/sway
|
||||||
|
modules are intentionally excluded (they rely on a NixOS-provided Sway/Firefox
|
||||||
|
binary).
|
||||||
|
- `homeModules` — the reusable modules exported so another flake can import them
|
||||||
|
(`inputs.<this>.homeModules.default`). Consumers must supply the module args
|
||||||
|
these expect: `inputs` always, `identity` for git/desktop, `portable` for sway.
|
||||||
|
|
||||||
## Applying
|
## Applying
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -35,25 +64,25 @@ darwin-rebuild switch --flake .#lyrathorpe-mac
|
|||||||
## Shell environment & keybindings
|
## Shell environment & keybindings
|
||||||
|
|
||||||
- Interactive shell features (zsh, tmux, git, ssh, CLI tools, auto-tmux):
|
- Interactive shell features (zsh, tmux, git, ssh, CLI tools, auto-tmux):
|
||||||
[`lyrathorpe/home/README.md`](./lyrathorpe/home/README.md).
|
[`home/README.md`](./home/README.md).
|
||||||
- All Sway / tmux / foot / zsh keyboard shortcuts:
|
- All Sway / tmux / foot / zsh keyboard shortcuts:
|
||||||
[`lyrathorpe/home/KEYBINDINGS.md`](./lyrathorpe/home/KEYBINDINGS.md).
|
[`home/KEYBINDINGS.md`](./home/KEYBINDINGS.md).
|
||||||
|
|
||||||
## Login / greeter
|
## Login / greeter
|
||||||
|
|
||||||
Graphical (Sway) hosts log in through a Wayland greeter — `greetd` running
|
Graphical (Sway) hosts log in through a Wayland greeter — `greetd` running
|
||||||
ReGreet inside the `cage` kiosk compositor — implemented in
|
ReGreet inside the `cage` kiosk compositor — implemented in
|
||||||
[`lyrathorpe/swaywm.nix`](./lyrathorpe/swaywm.nix), gated on
|
[`modules/sway.nix`](./modules/sway.nix), gated on
|
||||||
`features.swayDesktop.enable` (the option is declared in
|
`features.swayDesktop.enable` (the option is declared in
|
||||||
[`system/modules/features.nix`](./system/modules/features.nix), so headless hosts
|
[`modules/features.nix`](./modules/features.nix), so headless hosts
|
||||||
can leave it off without importing `swaywm.nix`). The greeter is forced to Dvorak
|
can leave it off without importing `modules/sway.nix`). The greeter is forced to Dvorak
|
||||||
to match the console and Sway session. Headless hosts (the WSL work box and the
|
to match the console and Sway session. Headless hosts (the WSL work box and the
|
||||||
Raspberry Pi server) keep plain TTY login. The target account needs a password
|
Raspberry Pi server) keep plain TTY login. The target account needs a password
|
||||||
(`passwd <user>`) before it can log in.
|
(`passwd <user>`) before it can log in.
|
||||||
|
|
||||||
## MacBook (Asahi) firmware
|
## MacBook (Asahi) firmware
|
||||||
|
|
||||||
The MBP host references `system/modules/firmware/` for Apple peripheral
|
The MBP host references `modules/firmware/` for Apple peripheral
|
||||||
firmware (Wi-Fi/Bluetooth). These blobs are **committed** (tracked) even though
|
firmware (Wi-Fi/Bluetooth). These blobs are **committed** (tracked) even though
|
||||||
`.gitignore` lists the directory: the flake is `git+file`, so it only sees
|
`.gitignore` lists the directory: the flake is `git+file`, so it only sees
|
||||||
tracked files — untracking them breaks `lyrathorpe-mbp` evaluation (and the CI
|
tracked files — untracking them breaks `lyrathorpe-mbp` evaluation (and the CI
|
||||||
@@ -63,7 +92,7 @@ redistributable; the repo is private.
|
|||||||
To refresh them, copy the firmware extracted during the Asahi install (from
|
To refresh them, copy the firmware extracted during the Asahi install (from
|
||||||
`/etc/nixos/firmware`, or re-extract per the
|
`/etc/nixos/firmware`, or re-extract per the
|
||||||
[Asahi NixOS docs](https://github.com/tpwrules/nixos-apple-silicon)) into
|
[Asahi NixOS docs](https://github.com/tpwrules/nixos-apple-silicon)) into
|
||||||
`system/modules/firmware/` and commit with `git add -f`.
|
`modules/firmware/` and commit with `git add -f`.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
+7
-5
@@ -15,8 +15,10 @@ Keyboard shortcuts have their own reference: [`KEYBINDINGS.md`](./KEYBINDINGS.md
|
|||||||
| GUI apps, GTK/Firefox theming, cursor | [`desktop.nix`](./desktop.nix) (graphical hosts only) |
|
| GUI apps, GTK/Firefox theming, cursor | [`desktop.nix`](./desktop.nix) (graphical hosts only) |
|
||||||
|
|
||||||
Shared by every host via [`default.nix`](./default.nix); the work box also layers
|
Shared by every host via [`default.nix`](./default.nix); the work box also layers
|
||||||
[`work.nix`](./work.nix) on top (work email, its own ssh config, extra packages,
|
[`work.nix`](../users/emmathorpe/work.nix) on top (its own ssh config, extra
|
||||||
and the C#/Helm language servers).
|
packages, and the C#/Helm language servers). The committer identity (name, email,
|
||||||
|
signing key) comes from the user registry
|
||||||
|
([`../users/registry.nix`](../users/registry.nix)), not this module.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -55,7 +57,7 @@ and the C#/Helm language servers).
|
|||||||
| `hyperfine` / `sd` | command-line benchmarking; saner find-and-replace than sed |
|
| `hyperfine` / `sd` | command-line benchmarking; saner find-and-replace than sed |
|
||||||
|
|
||||||
**Theming:** `fzf`, `bat`, `btop`, `lazygit` and `git`'s `delta` pager are all
|
**Theming:** `fzf`, `bat`, `btop`, `lazygit` and `git`'s `delta` pager are all
|
||||||
Catppuccin Mocha, driven from the shared `../catppuccin-mocha.nix` palette / the
|
Catppuccin Mocha, driven from the shared `../lib/catppuccin-mocha.nix` palette / the
|
||||||
catppuccin upstream themes.
|
catppuccin upstream themes.
|
||||||
|
|
||||||
**Env & defaults:** `xdg.enable` on; `PAGER`/`MANPAGER` (bat) set in `default.nix`
|
**Env & defaults:** `xdg.enable` on; `PAGER`/`MANPAGER` (bat) set in `default.nix`
|
||||||
@@ -148,7 +150,7 @@ current (`gc`/`fetch.writeCommitGraph`) so `lg` stays fast.
|
|||||||
| `cz` `cc` | `git cz <sub>` (e.g. `git cz c`) and `git cc` → commitizen prompt |
|
| `cz` `cc` | `git cz <sub>` (e.g. `git cz c`) and `git cc` → commitizen prompt |
|
||||||
|
|
||||||
| Behaviour | |
|
| Behaviour | |
|
||||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Pulls | rebase, with autostash + autosquash |
|
| Pulls | rebase, with autostash + autosquash |
|
||||||
| Fetch | prune deleted remote branches |
|
| Fetch | prune deleted remote branches |
|
||||||
| Conflicts | `zdiff3` (shows the common ancestor) |
|
| Conflicts | `zdiff3` (shows the common ancestor) |
|
||||||
@@ -157,7 +159,7 @@ current (`gc`/`fetch.writeCommitGraph`) so `lg` stays fast.
|
|||||||
| Commit editor | full diff shown (`commit.verbose`) |
|
| Commit editor | full diff shown (`commit.verbose`) |
|
||||||
| Misc | branches sorted by date, `column.ui = auto`, `help.autocorrect = prompt`, `push.autoSetupRemote` |
|
| Misc | branches sorted by date, `column.ui = auto`, `help.autocorrect = prompt`, `push.autoSetupRemote` |
|
||||||
| Global ignores | `result`, `result-*`, `.direnv`, `*.swp`, `.DS_Store` |
|
| Global ignores | `result`, `result-*`, `.direnv`, `*.swp`, `.DS_Store` |
|
||||||
| Signing | SSH commit + tag signing (`mkDefault`, so a host without the key in its agent can disable it). Personal email `iam@emmathe.dev`; the work box overrides email + signing. |
|
| Signing | SSH commit + tag signing (`mkDefault`, so a host without the key in its agent can disable it). Name, email and signing key all come from the per-user `identity` (the user registry, `../users/registry.nix`). |
|
||||||
|
|
||||||
## ssh
|
## ssh
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user