nixos/systemd: fix modprobe (#507397)

This commit is contained in:
Florian Klink
2026-04-08 17:31:37 +00:00
committed by GitHub
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -792,6 +792,10 @@ in
path = [ pkgs.util-linux ];
overrideStrategy = "asDropin";
};
systemd.services."modprobe@" = {
restartIfChanged = false;
serviceConfig.ExecSearchPath = lib.makeBinPath [ pkgs.kmod ];
};
systemd.services.systemd-random-seed.restartIfChanged = false;
systemd.services.systemd-remount-fs.restartIfChanged = false;
systemd.services.systemd-update-utmp.restartIfChanged = false;
+5
View File
@@ -60,5 +60,10 @@ in
machine.succeed("systemctl status example.service | grep 'Active: active'")
machine.succeed("systemctl show --property TasksMax --value user-1000.slice | grep 100")
with subtest("modprobe@ services work"):
modprobe_service_status = machine.succeed("systemctl show --property ExecMainStatus modprobe@configfs.service")
print(modprobe_service_status)
t.assertEqual("ExecMainStatus=0\n", modprobe_service_status)
'';
}