about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--nixos/modules/services/hardware/udev.nix5
-rw-r--r--nixos/modules/system/boot/systemd.nix2
-rw-r--r--nixos/tests/misc.nix6
3 files changed, 12 insertions, 1 deletions
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index d218aa1e5e16..875de55b6c6d 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -243,5 +243,10 @@ in
         fi
       '';
 
+    systemd.services.systemd-udevd =
+      { baseUnit = "${config.systemd.package}/example/systemd/system/systemd-udevd.service";
+        environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
+      };
+
   };
 }
diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index a35c3224db2a..36d273564083 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -50,7 +50,7 @@ let
       # Udev.
       "systemd-udevd-control.socket"
       "systemd-udevd-kernel.socket"
-      "systemd-udevd.service"
+      #"systemd-udevd.service"
       "systemd-udev-settle.service"
       "systemd-udev-trigger.service"
 
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix
index 0f57b9f61261..76298f1abd47 100644
--- a/nixos/tests/misc.nix
+++ b/nixos/tests/misc.nix
@@ -63,6 +63,12 @@ import ./make-test.nix {
           $machine->succeed('[ "`hostname`" = machine ]');
           $machine->succeed('[ "`hostname -s`" = machine ]');
       };
+
+      # Test whether systemd-udevd automatically loads modules for our hardware.
+      subtest "udev-auto-load", sub {
+          $machine->waitForUnit('systemd-udev-settle.service');
+          $machine->succeed('lsmod | grep psmouse');
+      };
     '';
 
 }