fix(qemu-guest): let the NixOS test framework override serial-getty@ttyS0 (#362)

test-instrumentation.nix sets serial-getty@ttyS0.enable = false at normal priority to keep ttyS0 free for the test backdoor console, while qemu-guest.nix set it to true at normal priority. Two conflicting normal-priority definitions made `nix flake check` fail while evaluating packages.x86_64-linux.ruby-nixos-tests.

Use lib.mkDefault so the test framework wins in tests while ordinary QEMU guests still enable the serial getty.
This commit is contained in:
ryan4yin | 二花 authored and GitHub committed 2026-10-03 12:18:46 +08:00
1 parent 18925eac8b
commit d5fa86dbc7
1 file changed
+3 -1
+3 -1
View File
@@ -33,6 +33,8 @@
services.openssh.enable = true;
# we configure the host via nixos itself, so we don't need the cloud-init
services.cloud-init.enable = lib.mkForce false;
systemd.services."serial-getty@ttyS0".enable = true;
# Default so the NixOS test framework can override it: test-instrumentation
# disables this getty to keep ttyS0 free for its backdoor console.
systemd.services."serial-getty@ttyS0".enable = lib.mkDefault true;
};
}