environment facts: pi alignment done by a pinned package input on .27 and .51
This commit is contained in:
@@ -136,34 +136,57 @@ What was changed:
|
||||
- Local git repo only, one commit, no remote. It is not on Gitea. Push it somewhere before
|
||||
relying on it, or accept that only this machine has it.
|
||||
|
||||
## NixOS alignment for Pi, 2026-11-11
|
||||
## NixOS alignment for Pi, measured 2026-11-12
|
||||
|
||||
Goal: all three machines on the same Pi. The `pi-coding-agent` version comes from the nixpkgs pin,
|
||||
so aligning means bumping `nixpkgs` and `home-manager` in each machine's flake.
|
||||
Goal: the same Pi on all three machines. `pi-coding-agent` comes from nixpkgs, so aligning used to
|
||||
mean bumping the whole system on each machine. That is what broke `.13`: `nixos-rebuild switch`
|
||||
restarts every changed unit in place, the network units restarted, the default route did not come
|
||||
back, and every service that needs the network died with it. Exit code 4 meant "units failed to
|
||||
start", not "the build failed" - the generation had already switched.
|
||||
|
||||
Measured after `nix flake update nixpkgs home-manager`:
|
||||
**The rule that follows: on a machine someone is using, a nixpkgs-sized change goes in with
|
||||
`nixos-rebuild boot` and a reboot, never `switch`.**
|
||||
|
||||
| machine | nixpkgs pin | pi after update | state |
|
||||
### What was done instead, and why it is safe
|
||||
|
||||
Pi is one package. Instead of moving a whole system to a new nixpkgs, a second flake input pinned
|
||||
to one revision provides only that package:
|
||||
|
||||
```nix
|
||||
nixpkgs-pi.url = "github:NixOS/nixpkgs/f4a03c008967841f2a0b3cb7c436fc6fc31671f6";
|
||||
# in the let block
|
||||
piPkgs = import nixpkgs-pi { inherit system; config.allowUnfree = true; };
|
||||
# in home-manager users.${user}.home.packages
|
||||
piPkgs.pi-coding-agent
|
||||
```
|
||||
|
||||
and `pi-coding-agent` was removed from `home/sam/home.nix` so exactly one `pi` is on `PATH`. The
|
||||
system pin on those machines did not move, so nothing else in the system changes and no network or
|
||||
service unit is restarted. Remove the input once the system pins are aligned for real.
|
||||
|
||||
### State, verified by building, not switching
|
||||
|
||||
| machine | method | pi in the built system | store path |
|
||||
|---|---|---|---|
|
||||
| `.13` | 2026-07-29 → 2026-11-07 | **1.5.0** | config ready, 12 derivations to build |
|
||||
| `.27` | same | 1.5.0 | evaluation fails in home-manager fontconfig |
|
||||
| `.51` | 2026-09-26 | 0.87.1 (today) | not started |
|
||||
| `.13` nixos-desktop | full nixpkgs bump (2026-11-07), **running** | 1.5.0 | `4yxlfj0sw5hlk7x1hiv0igm0dckg8rv9` |
|
||||
| `.27` sam-4screen-desktop | `nixpkgs-pi` input, built, **not yet switched** | 1.5.0 | `4yxlfj0sw5hlk7x1hiv0igm0dckg8rv9` |
|
||||
| `.51` sam-thinkpad | `nixpkgs-pi` input, built, **not yet switched** | 1.5.0 | `4yxlfj0sw5hlk7x1hiv0igm0dckg8rv9` |
|
||||
|
||||
Two changes are needed with the bump, both measured:
|
||||
One store path on all three: the same bytes of Pi, not merely the same version number.
|
||||
|
||||
1. `programs.zsh.initExtra` was renamed: `initContent`.
|
||||
2. **lan-mouse 0.11.0 panics** when `LIBGIT2_NO_VENDOR` is set and there is no system libgit2
|
||||
(nixpkgs 2026-11-07 sets it). An overlay on `pkgs.lan-mouse` did **not** fix it — the
|
||||
derivation hash barely moved and the same panic came back. What does work is building the
|
||||
flake's own lan-mouse package with `LIBGIT2_NO_VENDOR = "0"`:
|
||||
### Two other things measured on the way
|
||||
|
||||
```nix
|
||||
lm = lan-mouse.packages.${system}.default.overrideAttrs (o: { LIBGIT2_NO_VENDOR = "0"; });
|
||||
```
|
||||
- `programs.zsh.initExtra` is `initContent` in home-manager 2026-11. Both names evaluate on the
|
||||
older home-manager, so the rename is safe in either direction.
|
||||
- **lan-mouse 0.11.0 panics** when `LIBGIT2_NO_VENDOR` is set and no system libgit2 exists; nixpkgs
|
||||
2026-11-07 sets it. An overlay on `pkgs.lan-mouse` does **not** help. Building the flake's own
|
||||
package with the variable off does:
|
||||
|
||||
and using `lm` in `systemPackages` instead of the plain package. Built and verified:
|
||||
`/nix/store/f6w228jqp5wq6xznf6arq69kck6axyyf-lan-mouse-0.11.0`.
|
||||
```nix
|
||||
lm = lan-mouse.packages.${system}.default.overrideAttrs (o: { LIBGIT2_NO_VENDOR = "0"; });
|
||||
```
|
||||
|
||||
`.27`'s failure names `home-manager.users.sam.fonts.fontconfig.configFile.fonts.settings`. It is a
|
||||
home-manager option merge, not the Pi change. The smaller next attempt there is to bump `nixpkgs`
|
||||
only and leave `home-manager` where it is.
|
||||
`.13` now lists `lm` in `systemPackages` instead of `lan-mouse`.
|
||||
- `.27`'s full-system bump failed in `home-manager.users.sam.fonts.fontconfig.configFile.fonts.settings`
|
||||
(`recursiveUpdateUntil` / `head values`). The `nixpkgs-pi` route avoids it entirely; it is still
|
||||
an open item for the day the system pins are aligned.
|
||||
|
||||
Reference in New Issue
Block a user