Commit d36077c0 authored by nikstur's avatar nikstur
Browse files

nixos/systemd: fix modprobe

Upstream systemd changed how modprobe is discovered. It is now searched
for on path. Thus, add the kmod package to the ExecSearchPath of the
modprobe@.service.
parent ab4b7fa1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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)
  '';
}