about summary refs log tree commit diff
path: root/services
AgeCommit message (Collapse)Author
2026-10-02docs: drop hardcoded factory path in key commentsPjotr
2026-09-27vms: move hello-vm.scm from services/ to vms/Pjotr
VM definitions are not services; give them their own directory. The ../etc key reference still resolves from vms/.
2026-09-27services: slim down the hello-vm package setPjotr
Replace (cons hello %base-packages) with an explicit minimal list: bash, coreutils, findutils, grep, sed, gawk, tar, gzip, shadow, procps, guile and hello. %base-packages would add ~400 binaries to /run/current-system/profile/bin (nano, man-db, sudo, the inetutils ftp/telnet, wget, pciutils, ...). The ssh tools still come in via the openssh service and 'herd' via the essential shepherd service; the (useless) guix service is deleted from %base-services like in the containers. Also fix a list-building bug: (cons* ... hello) makes hello the TAIL of the list, so use 'list'. Result: profile/bin has 185 binaries (was 394) and the image store holds 263 items (was 362). Verified: ssh login, hello, and 'herd status ssh-daemon' all work.
2026-09-27services: add hello-vm.scm, a self-contained VM imagePjotr
Unlike 'guix system container', which bind-mounts the WHOLE host /gnu/store read-only into the guest (hardcoded %store-mapping in gnu/system/linux-container.scm -- there is no supported way to mount a subset), a qcow2 disk image built with 'guix system image -t qcow2' contains only the closure of the system: the guest sees ~360 store items instead of the host's 51815 and no host file systems at all. The definition is the minimal hello+ssh OS with %qemu-static-networking (QEMU user-mode network stack) and a serial console on ttyS0. Host SSH keys are generated at first boot and persist in the writable image, so they need no pinning. Verified: booted under qemu-system-x86_64 (TCG), ssh on forwarded port 2223 works with etc/hello-container-key, 'hello' runs, and the guest /gnu/store lists 362 items.
2026-09-27services: pin the SSH host key of the containersPjotr
Each container build generated fresh host keys (ssh-keygen -A at activation), so clients saw a REMOTE HOST IDENTIFICATION HAS CHANGED warning after every rebuild. Install the pre-generated ECDSA host key from etc/ssh-container-key into /etc/ssh at activation and set (generate-host-keys? #f) so every container presents the same host key. All keys now live in etc/ -- move the hello-container client key there as well and reference ../etc/ from the OS definitions. Verified: a rebuilt container serves SHA256:udYFFCT57uEdY1wDQgs8mvrB Vl2BLrq227eMSons2Mo and ssh login works with hello printing 'Hello, world!'.
2026-09-27services: split hello-container into minimal and debug variantsPjotr
hello-container.scm is now bare bones: hello + %base-packages, root user and the openssh service (key-only root login, password fallback "hello"), the /var/empty activation sshd needs, and the no-op sysctl/udev shepherd services that keep a container boot from hanging. The fingerprint activation and the DBG2 monitor loop moved to the new debug-container.scm (host-name "debug-container"). The explicit root account needs (uid 0): without it operating-system-accounts cannot recognize it and prepends its own default root, producing 'accounts appear more than once: root'. Both definitions pass 'guix system container --network --dry-run' (--network is required for ssh-daemon's 'networking' dependency). The minimal container boots and serves ssh on port 2222: hello runs over ssh with EXIT=0 and herd reports ssh-daemon started.
2026-09-26run-guix-system-container: KILL the whole container process groupPjotr Prins
The launcher setsid()s, so the container's shepherd (PID 1) and all its services live in the launcher's process group. Killing only the tracked launcher pid left the shepherd running -- holding e.g. the sshd port and making the next START fail to bind. KILL now SIGKILLs the process group (-pid); daemon shutdown likewise SIGTERMs groups and SIGKILLs survivors.
2026-09-26Adding an hello servicePjotr Prins