aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-16 13:09:17 +0000
committertv <tv@krebsco.de>2026-11-16 13:09:17 +0000
commit537ed0d545baaa0e4721aab1469cc72562a6ab71 (patch)
treecc18c84bfd99826a6423471bd9d50e33fa923ba8
parent4fb0752c37023856b802e77a9153db6c319c2c17 (diff)
don't let setuid wrappers hold up sysinit.target
Creating the ten setuid wrappers takes ~130ms and is the last thing sysinit.target waits for: [1.896068] Starting Create SUID/SGID Wrappers... [2.025499] Finished Create SUID/SGID Wrappers. [2.027817] Reached target System Initialization. The only wrapper needed during boot is unix_chkpwd, for the autologin, so order the wrappers before systemd-user-sessions.service instead.
-rw-r--r--default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/default.nix b/default.nix
index d562380..8b03123 100644
--- a/default.nix
+++ b/default.nix
@@ -88,6 +88,13 @@ let
];
services.journald.storage = "volatile"; # don't flush to /var/log
security.pam.services.login.lastlog.enable = lib.mkForce false;
+
+ # Only login needs a wrapper (unix_chkpwd), so create them in parallel
+ # to the rest of the boot instead of holding up sysinit.target.
+ systemd.services.suid-sgid-wrappers = {
+ wantedBy = lib.mkForce [ "systemd-user-sessions.service" ];
+ before = lib.mkForce [ "systemd-user-sessions.service" "shutdown.target" ];
+ };
};
};
@@ -121,7 +128,7 @@ let
};
});
in
-pkgs.writeShellScriptBin "run-firecracker-vm" ''
+pkgs.writeShellScriptBin "run-firecracker-vm" /* sh */ ''
# usage: run-firecracker-vm [STORE-PATH...]
# Packs the closure of the guest system (plus any given store paths) into
# an erofs image, which the guest mounts read-only at /nix/store.