aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs/run-firecracker-vm/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/run-firecracker-vm/default.nix')
-rw-r--r--pkgs/run-firecracker-vm/default.nix14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/run-firecracker-vm/default.nix b/pkgs/run-firecracker-vm/default.nix
index dbdf2b6..a8b3a92 100644
--- a/pkgs/run-firecracker-vm/default.nix
+++ b/pkgs/run-firecracker-vm/default.nix
@@ -217,6 +217,19 @@ let
systemd.tpm2.enable = false;
users.manageLingering = false;
+ # No screen, no X, and no hardware to tell apart, but virtio:
+ # neither kbd and systemd-vconsole-setup, nor fontconfig, nor su's
+ # xauth (shadow.nix sets it, not as a default), nor udev's hardware
+ # database.
+ console.enable = false;
+ fonts.fontconfig.enable = false;
+ security.pam.services.su.forwardXAuth = lib.mkForce false;
+ environment.etc."udev/hwdb.bin".enable = false;
+ # Nothing to unmount from a ramfs at shutdown: / is a tmpfs, and the
+ # store's images are read-only (systemd-shutdown remounts what's
+ # still busy, like the rw-store, read-only).
+ systemd.shutdownRamfs.enable = false;
+
# /var is empty on every boot, which makes these run every time,
# in the critical path to sysinit.target.
systemd.suppressedSystemUnits = [
@@ -238,7 +251,6 @@ let
"sys-kernel-debug.mount"
"sys-kernel-tracing.mount"
"systemd-pstore.service"
- "systemd-vconsole-setup.service"
] (_: { enable = lib.mkForce false; });
# Of the generators systemd runs after switching root, only fstab and