Skip to content

Commit 8d3d2b7

Browse files
committed
refactor(nix): retire 0-common into package, waypipe, valent and shell modules
Package policy becomes technet.system.packages.{unfree,minimal}. Waypipe is a generic client/server module: servers trust every identity with a waypipe.publicKey for the apps it points at them. Valent is technet.apps.valent, on Odin and Heimdall only. The terminal file splits into apps/shell/{bash,prompt,aliases,atuin} for every technet.apps.shell.users account and apps/cli-tools; host aliases come from identities, upgrade rebuilds from the published flake, and Atuin clients find the server from whichever host enables it. nix/0-common is gone.
1 parent 42e78b8 commit 8d3d2b7

63 files changed

Lines changed: 532 additions & 457 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Configured by this repo, one flake output each:
1818
| [Thor](docs/thor.md) | PinePhone | `aarch64-linux` | [`5-phone`](nix/5-phone) |
1919
| [Rock64](docs/rock64.md) | Spare SBC — basic system, not deployed | `aarch64-linux` | [`6-rock64`](nix/6-rock64) |
2020

21-
Every host also imports [`0-common`](nix/0-common).
21+
Every host also takes the shared modules in [`5-modules`](nix/5-modules), switched on by its folder under [`1-hosts`](nix/1-hosts).
2222

2323
## Other devices
2424

‎docs/build-cache-audit.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Heimdall's dry-run.
7676
| `nix/0-common/1-system/software/overlays.nix` | `sops-nix/pkgs/sops-install-secrets/default.nix` still takes `buildGo125Module`, and evaluating that attribute in the pinned nixpkgs throws. No extra cost: sops-nix follows nixpkgs, so the package is built per-arch regardless. Note it is a fleet-wide alias silently shifting a Go major version — it will stop being noticed once sops-nix catches up. |
7777
| `nix/5-phone/1-system/calls.nix` | Required. The test suite nests user namespaces under bwrap, which qemu-user cannot emulate, so an aarch64 build on Odin dies there. |
7878
| `hyprland/{lid,overview,edge-snap,sounds,scripts}.nix` | `writeShellApplication` only. No compilation. |
79-
| `0-common/4-apps/technet/waypipe.nix` | One meson flag on a leaf package. |
79+
| `5-modules/services/waypipe.nix` | One meson flag on a leaf package. |
8080
| `5-phone/1-system/clevis.nix`, `5-phone/3-apps/native/phone.nix` | Single leaf packages, no fan-out. |
8181

8282
## 3. Overlays that cost real build time

‎docs/conventions.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ kind, keep it.
2929

3030
## Module layout
3131

32-
- Numeric prefixes belong to the top two directory levels only: the host (`0-common`, `3-laptop`) and the category
32+
- Numeric prefixes belong to the top two directory levels only: the host (`2-server`, `3-laptop`) and the category
3333
under it (`1-system`, `2-users`, `3-services`, `4-apps`). Deeper folders and every `.nix` file have plain names.
3434
A category with one file is that file (`5-phone/2-users.nix`). A group of related modules gets a folder with a
3535
`default.nix`; the import order there is the only sequencing signal, so order it by how things apply.
@@ -54,7 +54,7 @@ kind, keep it.
5454
(addresses, SSH host keys, Syncthing ID) that other hosts read; `default.nix`, if present, makes it a NixOS
5555
system named after the folder: it imports `identity.nix`, sets `networking.hostName`, enables its platforms
5656
and profiles, and flips `technet.*` switches. A device with only `identity.nix` (ThorX, the Android phone) gets
57-
no system. Until their parts move out, hosts also import `0-common` and their numbered folder. Heimdall,
57+
no system. Until their parts move out, hosts also import their numbered folder. Heimdall,
5858
Ragnarok and Odin are on `architecture.x86_64` and `boot.uefi`; Thor and Rock64 have no platform yet and set
5959
`nixpkgs.hostPlatform` themselves.
6060
- [`nix/6-lib`](../nix/6-lib) has `mkHost`, which adds the shared modules (`nix/5-modules`, `nix/3-profiles`,

‎docs/heimdall.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| --- | --- |
55
| Device | Lenovo ThinkCentre M710q Tiny, Intel Core i3-7100T |
66
| Platform | `x86_64-linux` |
7-
| Modules | [`nix/0-common`](../nix/0-common) + [`nix/2-server`](../nix/2-server) |
7+
| Modules | [`nix/1-hosts/Heimdall`](../nix/1-hosts/Heimdall) + [`nix/2-server`](../nix/2-server) |
88
| Address | `heimdall.technet`, `10.100.100.1` over WireGuard, `192.168.0.2` on the LAN |
99

1010
Heimdall is the always-on server and the hub of the network. It terminates the
@@ -285,7 +285,7 @@ to clear it from Microsoft's servers sooner.
285285

286286
## Shell history
287287

288-
Heimdall runs [Atuin](../nix/2-server/3-services/technet/atuin.nix) at
288+
Heimdall runs [Atuin](../nix/5-modules/apps/shell/atuin.nix) at
289289
`https://atuin.heimdall.technet/` as the fleet's shell history store. Every host
290290
records `beatlink` and `root` shell commands into it end-to-end encrypted, so
291291
Ctrl-R on any host searches the whole fleet's history. Plain `HISTFILE` is left

‎docs/odin.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
| | |
44
| --- | --- |
55
| Platform | `x86_64-linux` |
6-
| Modules | [`nix/0-common`](../nix/0-common) + [`nix/3-laptop`](../nix/3-laptop) |
6+
| Modules | [`nix/1-hosts/Odin`](../nix/1-hosts/Odin) + [`nix/3-laptop`](../nix/3-laptop) |
77
| Address | `odin.technet`, `10.100.100.2` over WireGuard |
88

99
Odin is the workstation, and the machine this repo is normally edited and
@@ -116,9 +116,9 @@ WireGuard address then the LAN one. Thor overrides this to its USB link address.
116116

117117
## nixtool
118118

119-
The module is imported for every host by
120-
[`nixtool.nix`](../nix/0-common/1-system/software/nixtool.nix), but only Odin
121-
enables it, in [`nixtool.nix`](../nix/3-laptop/4-apps/technet/nixtool.nix), which
119+
The module is imported for every host by `mkHost` and configured by
120+
[`nixtool.nix`](../nix/5-modules/apps/system/nixtool.nix), but only Odin
121+
enables it, in its [host module](../nix/1-hosts/Odin/default.nix), which
122122
renders `/etc/nixtool/nixtool-config.json`. Installer credentials are named as
123123
sops paths rather than values, so nothing sensitive reaches the Nix store.
124124

‎docs/ragnarok.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| -------- | ----------------------------------------------------------------------------------- |
55
| Device | Acer Aspire E5-575 laptop, Intel Core i3-7100U |
66
| Platform | `x86_64-linux` |
7-
| Modules | [`nix/0-common`](../nix/0-common) + [`nix/1-backup-server`](../nix/1-backup-server) |
7+
| Modules | [`nix/1-hosts/Ragnarok`](../nix/1-hosts/Ragnarok) + [`nix/1-backup-server`](../nix/1-backup-server) |
88
| Address | `ragnarok.technet`, `10.100.100.6` over WireGuard, `192.168.0.7` on the LAN |
99

1010
Ragnarok is the machine whose job is to hold backups. It is a WireGuard client,

‎docs/rock64.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| -------- | ---------------------------------------------------------------------------- |
55
| Device | Pine64 Rock64 SBC, Rockchip RK3328 |
66
| Platform | `aarch64-linux` |
7-
| Modules | [`nix/0-common`](../nix/0-common) + [`nix/6-rock64`](../nix/6-rock64) |
7+
| Modules | [`nix/1-hosts/Rock64`](../nix/1-hosts/Rock64) + [`nix/6-rock64`](../nix/6-rock64) |
88

99
The Rock64 was [Ragnarok](ragnarok.md), the backup server, until that role
1010
moved to an Acer laptop on 2026-11-21 and took both drives with it. Its

‎docs/thor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| --- | --- |
55
| Device | Pine64 PinePhone (1.2), Allwinner A64 |
66
| Platform | `aarch64-linux` |
7-
| Modules | [`nix/0-common`](../nix/0-common) + [`nix/5-phone`](../nix/5-phone) |
7+
| Modules | [`nix/1-hosts/Thor`](../nix/1-hosts/Thor) + [`nix/5-phone`](../nix/5-phone) |
88
| Root disk | eMMC, `mmc-ASTCXX_0xd1002721` |
99
| Address | `thor.technet`, `10.100.100.4` over WireGuard |
1010

‎nix/0-common/1-system/default.nix‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎nix/0-common/1-system/software/default.nix‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)