boot-tree: portable unit, dracut and mkinitcpio hooks, self-quieting console, minimal NixOS module

This commit is contained in:
Willem Vanhulle committed 2026-10-11 15:54:28 +02:00
1 parent 2b1447965a
commit 1482d4437a
13 files changed
+208 -121

No files matched your search

+5 -3
View File
@@ -35,9 +35,11 @@ in
};
};
services.boot-tree = {
enable = true;
consoleFont = "ter-v20n";
services.boot-tree.enable = true;
console = {
earlySetup = true;
font = "${pkgs.terminus_font}/share/consolefonts/ter-v20n.psf.gz";
};
systemd.services = lib.mapAttrs (_: demoService) demoUnits.services // {
+16 -9
View File
@@ -3,16 +3,19 @@
name = "boot-tree";
enableOCR = true;
nodes.machine = {
imports = [ demoHost ];
virtualisation = {
memorySize = 2048;
qemu.options = [
"-vga none"
"-device virtio-vga,xres=1280,yres=800"
];
nodes.machine =
{ lib, ... }:
{
imports = [ demoHost ];
systemd.settings.Manager.ShowStatus = lib.mkForce true;
virtualisation = {
memorySize = 2048;
qemu.options = [
"-vga none"
"-device virtio-vga,xres=1280,yres=800"
];
};
};
};
testScript = ''
machine.start()
@@ -36,6 +39,10 @@
assert "handing the console over" in journal, "never handed the console over"
machine.succeed("test \"$(systemctl show -p Result --value boot-tree)\" = success")
console_level = machine.succeed("cut -f1 /proc/sys/kernel/printk").strip()
assert console_level != "1", f"kernel console level was not restored: {console_level}"
show_status = machine.succeed("systemctl show -p ShowStatus --value").strip()
assert show_status == "yes", f"systemd status output was not restored: {show_status}"
machine.screenshot("handed-over")
'';
}