fixup! feat: install on any Linux with Nix and systemd

This commit is contained in:
dckc committed 2026-12-02 17:41:19 -06:00
1 parent db174fc610
commit c335935e2d
1 file changed
+9 -6
+9 -6
View File
@@ -13,7 +13,7 @@ A private git repository of your own holds what's yours: the names you choose, a
url = "git+https://git.inference.coop/dckc/pdtv26";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { pdtv26, ... }: {
outputs = { self, pdtv26, ... }: {
nixosConfigurations.pimote = pdtv26.lib.mkBox {
name = "pimote"; # the box's host name on your network
server = "den-pc"; # your home server's host name: speech and the brain
@@ -21,6 +21,8 @@ A private git repository of your own holds what's yours: the names you choose, a
admin = "pat"; # who looks after the box, and logs in to deploy
sshKeys = [ "ssh-ed25519 AAAA... pat@laptop" ];
};
# The box's SD card image, built on x86_64 Linux.
packages.x86_64-linux.sd-image = self.nixosConfigurations.pimote.config.system.build.sdImage;
};
}
```
@@ -38,13 +40,14 @@ The brain comes after the box, in step 5, since it needs the box's keys.
## 3. Make the box's SD card
On any Linux machine with Nix that can run ARM programs (on Debian or Ubuntu, `apt install qemu-user-static`), in pdtv26's `box/`:
The image carries your household's names, so it's built from your household repository, on any Linux machine with Nix that can run ARM programs (on Debian or Ubuntu, `apt install qemu-user-static`). The Wi-Fi passphrase and the keys stay out of it.
1. `make image FLAKE=path/to/household BOX=pimote`, then `make card DEV=/dev/sdX` to check you have the right device, and `make flash DEV=/dev/sdX CONFIRM=erase`.
2. `make wifi-secret SSID=MyNetwork`: it puts the network's PSK on the card from the passphrase in your desktop keyring, not in the image or the repository. Store the passphrase there once, with `secret-tool store --label="Wi-Fi MyNetwork" service wifi ssid MyNetwork`.
3. Put the card in the Pi, plug in the IR emitter's USB cord, and power it up.
1. In your household repository: `nix build --option extra-platforms aarch64-linux .#sd-image`.
2. In pdtv26's `box/`: `make card DEV=/dev/sdX` to check you have the right device, then `make flash DEV=/dev/sdX IMG=path/to/household/result/sd-image/*.img CONFIRM=erase`.
3. Also in `box/`: `make wifi-secret SSID=MyNetwork`: it puts the network's PSK on the card from the passphrase in your desktop keyring, not in the image or the repository. Store the passphrase there once, with `secret-tool store --label="Wi-Fi MyNetwork" service wifi ssid MyNetwork`.
4. Put the card in the Pi, plug in the IR emitter's USB cord, and power it up.
After this, changes to the box go over ssh: `make deploy FLAKE=path/to/household BOX=pimote`.
After this, changes to the box go over ssh, from your household repository: `nixos-rebuild switch --flake .#pimote --target-host pat@pimote.local --sudo --option extra-platforms aarch64-linux`.
## 4. Join the private network