diff options
| author | tv <tv@krebsco.de> | 2026-11-16 03:08:43 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-16 03:08:43 +0000 |
| commit | a2b3ca7b1732851c27b90d7249747e2b8ef2f16d (patch) | |
| tree | 5ea9000f0ebd2d6f57f285629d0ed3d3fe8de5ab | |
| parent | 3d92584c98c03a59e1a26184963307f0f112e73b (diff) | |
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.
| -rw-r--r-- | default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
