NixOS alignment notes: initContent, the lan-mouse panic, and the machine states
This commit is contained in:
@@ -1436,3 +1436,97 @@ That runs the work on `.13` over ssh, creates the session there, and builds eigh
|
||||
- decision: [[packs/paperclip-harness/50-decisions/paperclip-harness-ui-six-workspaces-spec-first-four-panel-li|Convention: folder and session must live on the same machine; --host only when they differ]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-home-2026-11-12-00-35-25|Rich discovery: home 2026-11-12 00:35:25]]
|
||||
- context: [[packs/paperclip-harness/20-context/home|home]]
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Update (2026-11-12 01:11:14)
|
||||
|
||||
Trigger: a `nixos-rebuild` fails while building a specific derivation (e.g. a Rust/crate package reacting badly to the newer nixpkgs).
|
||||
|
||||
Procedure:
|
||||
1. Identify the failing package and its exact error text; send/triage the first error block.
|
||||
2. Build only that package with the intended override, e.g. via nix build of the flake package, before touching the system config. Validated example: lan-mouse override produced /nix/store/f6w228jqp5wq6xznf6arq69kck6axyyf-lan-mouse-0.11.0.
|
||||
3. Apply the minimal override in /etc/nixos/flake.nix, e.g. `lm = lan-mouse.packages.${system}.default.overrideAttrs (o: { LIBGIT2_NO_VENDOR = "0"; });`.
|
||||
4. Dry-run/evaluate the system build to confirm it computes, e.g. confirming 29 derivations to build and the expected pi version.
|
||||
5. Switch: `sudo nixos-rebuild switch --flake /etc/nixos#<host>` (e.g. #nixos-desktop for .13).
|
||||
|
||||
Rollback: switch back to the previous generation with `sudo nixos-rebuild switch --rollback` (or boot the previous generation) if the new generation misbehaves.
|
||||
|
||||
Troubleshooting: if the next rebuild fails elsewhere, repeat step 2 for the new failing package rather than guessing; eval errors in home-manager (e.g. fontconfig settings merge) are separate from package build errors and should be fixed deliberately.
|
||||
|
||||
## Detailed procedure from completed turn
|
||||
|
||||
Both done, and the rebuild failure is fixed.
|
||||
|
||||
## The commands are now plain commands
|
||||
|
||||
`office`, `board`, `merge`, `review`, `triage`, `project-reset` are on your path. Each is a two-line wrapper in `~/.local/bin` that runs the real script in this repository — a **wrapper, not a symlink**, for the reason your old notes give: a symlinked script resolves its own directory to `~/.local/bin` and cannot find its siblings. The previous project's three wrappers were moved to `~/.local/bin/.old-harness/`, not deleted, in case you want to compare.
|
||||
|
||||
```
|
||||
$ office --help
|
||||
office — open a folder as a project
|
||||
|
||||
office <folder> --project "<Name>" adopt a project Paperclip already has
|
||||
office <folder> --new "<Name>" create the Paperclip project too
|
||||
office <folder> --project "<Name>" --host nixos-desktop the folder is on that machine
|
||||
office <folder> --dry say what would happen, write nothing
|
||||
|
||||
The folder and the session live on the same machine. If you are typing inside the
|
||||
session, on the machine that owns the folder, it is just: office <folder>.
|
||||
```
|
||||
|
||||
Two bugs fixed while doing it: `office --help` used to run with the current directory and create a stray session called `tmp` (I killed it), and the session was being created before the Paperclip project was checked — so a bad command left a session behind. Both corrected.
|
||||
|
||||
## The `.13` rebuild failure: found and fixed
|
||||
|
||||
`lan-mouse 0.11.0` panics during build:
|
||||
|
||||
```
|
||||
The environment variable LIBGIT2_NO_VENDOR has been set but no compatible system libgit2 could be found.
|
||||
```
|
||||
|
||||
The new nixpkgs sets that variable, and lan-mouse's crate insists on a system libgit2. Letting it vendor its own fixes it. I built it with the override before touching anything:
|
||||
|
||||
```
|
||||
/nix/store/f6w228jqp5wq6xznf6arq69kck6axyyf-lan-mouse-0.11.0 ← built
|
||||
```
|
||||
|
||||
and applied the one-line change to `/etc/nixos/flake.nix`:
|
||||
|
||||
```nix
|
||||
lm = lan-mouse.packages.${system}.default.overrideAttrs (o: { LIBGIT2_NO_VENDOR = "0"; });
|
||||
```
|
||||
|
||||
Now the system dry-run evaluates with **29 derivations to build** and pi at **1.5.0**. Your rebuild:
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch --flake /etc/nixos#nixos-desktop
|
||||
```
|
||||
|
||||
If it fails again, send the first error block; the next likely candidate is another package that the newer nixpkgs treated differently, and each one is found the same way — build just that package with an override before switching.
|
||||
|
||||
## Where the machines stand
|
||||
|
||||
| | config changed | evaluates to | running | next |
|
||||
|---|---|---|---|---|
|
||||
| `.13` | lock + `initContent` + lan-mouse fix | pi 1.5.0, 29 to build | 0.82.1 | rebuild now |
|
||||
| `.27` | lock + `initContent` | pi 1.5.0, but **eval error** in home-manager fontconfig | 0.82.1 | needs a fix; smaller attempt is bumping nixpkgs only |
|
||||
| `.51` | not yet | pi 0.87.1 | 0.87.1 | the same three edits, then rebuild |
|
||||
|
||||
`.27`'s failure names `home-manager.users.sam.fonts.fontconfig.configFile.fonts.settings` — home-manager 2026-11-10 with a font declaration it cannot merge. It has nothing to do with Pi, and I would rather fix it deliberately than guess at its font config.
|
||||
|
||||
Committed as `a129c4e` and pushed. After `.13` reboots into the new generation, tell me what `pi --version` says and I will do `.27` and `.51` to match.
|
||||
|
||||
## Evidence
|
||||
|
||||
- Confidence: 85%
|
||||
- Reason: Repeatable validated procedure used and generalised this turn.; enriched with final-answer detail because persistence should be reusable
|
||||
|
||||
## Related learned memories <!-- same-turn-2026-11-12 01:11:14 -->
|
||||
|
||||
- context: [[packs/paperclip-harness/20-context/tmp|paperclip-harness repository]]
|
||||
- observation: [[packs/paperclip-harness/60-observations/tmp-repository-structure-and-configuration-patterns|lan-mouse 0.11.0 build panic on new nixpkgs and the override fix]]
|
||||
- runbook: [[packs/paperclip-harness/70-runbooks/tmp-deployment-operations|Fix a single package build before a NixOS rebuild, then switch]]
|
||||
- action: [[packs/paperclip-harness/40-actions/2026-11-10-wrote-docs-ui-layout-md-and-three-live-layout-mockups|office CLI wrappers installed; office bugs fixed; .13 rebuild failure fixed and pushed]]
|
||||
- session: [[packs/paperclip-harness/80-sessions/rich-discovery-local-2026-11-12-01-11-14|Rich discovery: .local 2026-11-12 01:11:14]]
|
||||
|
||||
Reference in New Issue
Block a user