From ed31e0235e97a20ab013c3f1c3fed04041cd146e Mon Sep 17 00:00:00 2001 From: ners Date: Tue, 21 Nov 2023 15:09:31 +0100 Subject: [PATCH] treewide: replace broken udev paths with systemd --- nixos/modules/security/lock-kernel-modules.nix | 4 ++-- nixos/modules/services/hardware/usbmuxd.nix | 2 +- pkgs/tools/filesystems/stratisd/default.nix | 5 ++--- pkgs/tools/misc/brltty/default.nix | 4 ++-- pkgs/tools/misc/os-prober/default.nix | 4 ++-- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/nixos/modules/security/lock-kernel-modules.nix b/nixos/modules/security/lock-kernel-modules.nix index 333b64801426..461b9ffe7ee0 100644 --- a/nixos/modules/security/lock-kernel-modules.nix +++ b/nixos/modules/security/lock-kernel-modules.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, lib, ... }: with lib; @@ -49,7 +49,7 @@ with lib; }; script = '' - ${pkgs.udev}/bin/udevadm settle + ${config.systemd.package}/bin/udevadm settle echo -n 1 >/proc/sys/kernel/modules_disabled ''; }; diff --git a/nixos/modules/services/hardware/usbmuxd.nix b/nixos/modules/services/hardware/usbmuxd.nix index 9466ea26995b..d05ad3af8b12 100644 --- a/nixos/modules/services/hardware/usbmuxd.nix +++ b/nixos/modules/services/hardware/usbmuxd.nix @@ -77,7 +77,7 @@ in serviceConfig = { # Trigger the udev rule manually. This doesn't require replugging the # device when first enabling the option to get it to work - ExecStartPre = "${pkgs.udev}/bin/udevadm trigger -s usb -a idVendor=${apple}"; + ExecStartPre = "${config.systemd.package}/bin/udevadm trigger -s usb -a idVendor=${apple}"; ExecStart = "${cfg.package}/bin/usbmuxd -U ${cfg.user} -v"; }; }; diff --git a/pkgs/tools/filesystems/stratisd/default.nix b/pkgs/tools/filesystems/stratisd/default.nix index 707b3ac654e4..bd8d4e89dd01 100644 --- a/pkgs/tools/filesystems/stratisd/default.nix +++ b/pkgs/tools/filesystems/stratisd/default.nix @@ -11,7 +11,6 @@ , dbus , cryptsetup , util-linux -, udev , lvm2 , systemd , xfsprogs @@ -53,7 +52,7 @@ stdenv.mkDerivation rec { --replace stratis-min "$out/bin/stratis-min" \ --replace systemd-ask-password "${systemd}/bin/systemd-ask-password" \ --replace sleep "${coreutils}/bin/sleep" \ - --replace udevadm "${udev}/bin/udevadm" + --replace udevadm "${systemd}/bin/udevadm" ''; nativeBuildInputs = [ @@ -72,7 +71,7 @@ stdenv.mkDerivation rec { dbus cryptsetup util-linux - udev + systemd lvm2 ]; diff --git a/pkgs/tools/misc/brltty/default.nix b/pkgs/tools/misc/brltty/default.nix index 5838c24172f8..f9b3ec3f73ac 100644 --- a/pkgs/tools/misc/brltty/default.nix +++ b/pkgs/tools/misc/brltty/default.nix @@ -1,5 +1,5 @@ { lib, stdenv, fetchurl, pkg-config, python3, bluez -, tcl, acl, kmod, coreutils, shadow, util-linux, udev +, tcl, acl, kmod, coreutils, shadow, util-linux , alsaSupport ? stdenv.isLinux, alsa-lib , systemdSupport ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd }: @@ -90,6 +90,6 @@ stdenv.mkDerivation rec { ) substituteInPlace $out/libexec/brltty/systemd-wrapper \ --replace 'logger' "${util-linux}/bin/logger" \ - --replace 'udevadm' "${udev}/bin/udevadm" + --replace 'udevadm' "${systemd}/bin/udevadm" ''; } diff --git a/pkgs/tools/misc/os-prober/default.nix b/pkgs/tools/misc/os-prober/default.nix index b38cb81748a6..5d15b7077385 100644 --- a/pkgs/tools/misc/os-prober/default.nix +++ b/pkgs/tools/misc/os-prober/default.nix @@ -4,7 +4,7 @@ coreutils, # mktemp grub2, # grub-mount and grub-probe cryptsetup, # cryptsetup libuuid, # blkid and blockdev -udev, # udevadm udevinfo +systemd, # udevadm ntfs3g, # ntfs3g dmraid, # dmraid lvm2 # lvs @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { done; for file in $out/bin/*; do wrapProgram $file \ - --suffix PATH : ${lib.makeBinPath [ grub2 udev coreutils cryptsetup libuuid ntfs3g lvm2 dmraid ]} \ + --suffix PATH : ${lib.makeBinPath [ grub2 systemd coreutils cryptsetup libuuid ntfs3g lvm2 dmraid ]} \ --run "[ -d /var/lib/os-prober ] || mkdir /var/lib/os-prober" done; '';