Merge pull request 'robotnix: create /usr/bin in the robot root so nspawn can start genix' (#2) from hermes/nixos-setup:fix/lab-robotnix-genix-ostree into main
Reviewed-on: http://gitea.app.internal:3000/ari/nixos-setup/pulls/2
This commit is contained in:
commit
567a85b946
2 files changed
+5
No files matched your search
@@ -104,6 +104,10 @@ Runtime state comes from `/etc/robotnix.json`, written by the module.
|
|||||||
the `containers.*` module: that module shares the host store, which would
|
the `containers.*` module: that module shares the host store, which would
|
||||||
break the robot's self-rebuilds. The unit mirrors `nixos-containers.nix`
|
break the robot's self-rebuilds. The unit mirrors `nixos-containers.nix`
|
||||||
(`Type=notify`, SIGRTMIN+3, exit status 133, `machine.slice`).
|
(`Type=notify`, SIGRTMIN+3, exit status 133, `machine.slice`).
|
||||||
|
- The robot's root gets `/usr/bin` before its first start: `systemd-nspawn`
|
||||||
|
refuses a tree without `/usr` ("doesn't look like it has an OS tree"), the
|
||||||
|
same reason `nixos-containers.nix` creates it. The seed's tail block runs on
|
||||||
|
every start, so no reseed is needed after this landed.
|
||||||
- `systemd-nspawn` runs in `machine.slice` (systemd's nspawn home), not
|
- `systemd-nspawn` runs in `machine.slice` (systemd's nspawn home), not
|
||||||
`system.slice`.
|
`system.slice`.
|
||||||
- Timers use `skyg.server.timers`; eval asserts unique robot ids/IPs, name
|
- Timers use `skyg.server.timers`; eval asserts unique robot ids/IPs, name
|
||||||
|
|||||||
@@ -224,6 +224,7 @@ let
|
|||||||
fi
|
fi
|
||||||
# What nspawn and NixOS's init expect (same as nixos-containers).
|
# What nspawn and NixOS's init expect (same as nixos-containers).
|
||||||
mkdir -p "$root/etc" "$root/var/lib" "$root/root" "$root/home"
|
mkdir -p "$root/etc" "$root/var/lib" "$root/root" "$root/home"
|
||||||
|
mkdir -p -m 0755 "$root/usr/bin"
|
||||||
chmod 0700 "$root/root"
|
chmod 0700 "$root/root"
|
||||||
[ -e "$root/etc/os-release" ] || [ -L "$root/etc/os-release" ] || touch "$root/etc/os-release"
|
[ -e "$root/etc/os-release" ] || [ -L "$root/etc/os-release" ] || touch "$root/etc/os-release"
|
||||||
[ -e "$root/etc/machine-id" ] || touch "$root/etc/machine-id"
|
[ -e "$root/etc/machine-id" ] || touch "$root/etc/machine-id"
|
||||||
|
|||||||
Reference in new issue
Block a user