From a2b3ca7b1732851c27b90d7249747e2b8ef2f16d Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 16 Nov 2026 03:08:43 +0000 Subject: use a fixed machine-id and drop the getty on tty1 With a tmpfs root, every boot is a first boot, which makes systemd apply presets and commit a transient machine-id. There's no display, so the getty on tty1 only opens a session nobody sees. The serial getty is pulled in by systemd-getty-generator, not by getty.target.wants. --- default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/default.nix b/default.nix index 8f64d78..b0af4ff 100644 --- a/default.nix +++ b/default.nix @@ -42,6 +42,10 @@ let }; services.getty.autologinUser = "root"; + systemd.targets.getty.wants = lib.mkForce [ ]; # no getty on tty1 + + # A fixed machine-id, so systemd doesn't consider every boot the first. + environment.etc.machine-id.text = builtins.hashString "md5" "firecracker" + "\n"; networking.useDHCP = false; networking.resolvconf.enable = false; -- cgit v1.3.1