aboutsummaryrefslogtreecommitdiffstats
path: root/layers
Commit message (Collapse)AuthorAgeFilesLines
* layers/console.nix: the console's size follows the terminal'stv5 days1-1/+41
| | | | | | | | | | | | | A serial line, unlike a pty, doesn't get told when the terminal's size changes, so the console kept the size the run script saw at boot (systemd.tty.rows/columns.ttyS0), e.g. 6 rows, from a tmux pane that small for a moment, and a tmux attached there drew for that, whatever the terminal's size. Now there's resize, which asks the terminal (ESC[6n, after moving the cursor as far as it goes, then back) and sets what it answers (stty rows, cols), and the shell on the serial console runs it before each prompt, until the terminal doesn't answer (within a second). A tmux attached there still keeps its size until attached again.
* layers/console.nix: a shell on the serial console, to import into a layertv6 days1-0/+23
| | | | | | | | | | | | | | | Since the base system turned off the console (and with it kbd), it had no getty at all: NixOS's gettys come with the console (services/ttys/getty.nix), so there was no shell on ttyS0 any more, only the kernel's and systemd's messages, and ssh. That stays the default, and the base system's console.enable is only that now, a default, for layers/console.nix: the console, with root logged in on ttyS0 (a default, too: services.getty.autologinUser can name another user, or be null for a login prompt), but no getty on tty1, and no systemd-vconsole-setup, which moved there from the base system, like the autologin. It's small, so the README has it imported into another layer, rather than as a layer, with an image, of its own, which works, too.
* run-firecracker-vm: nix as a layer, a read-only store without ittv6 days1-0/+120
The base system had nix, the nix-daemon, the host's store and nixpkgs via 9P, and a writable store on a drive, a scratch file without --store. Now all of that is in a layer of its own, layers/nix.nix, and the base system has neither nix nor nix-daemon in its closure: its store is its images, read-only, an overlay of them, or with a single image, the image itself, as overlayfs needs at least two lower layers without an upper one. This can become the base layer for guests that only run services. As a layer, nix gets an image of its own: put first, it's the same for all guests with nix, instead of in the image of whichever layer wants nix. It sets fc.nix, which the run script goes by, and nix.enable; setting nix.enable without it fails an assertion, as the run script wouldn't give the guest the drive for its store. The image decides, so the run script checks that the options fit it: a guest with nix requires --store (no more scratch store), and one without refuses --store, --store-size, --nixpkgs and --nixpkgs-cache. Without the rw-store drive, the images come first, and home after them; the store and nixpkgs aren't served, there's no fc.registration, and the initrd doesn't mount anything via 9P. The run script now waits for each of the 9P servers it starts, not only the store's.