From eeb148bb21a63f99cf29a91f8ddae3a982843d19 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Sun, 9 Mar 2025 20:57:42 +0100 Subject: [PATCH] [Filesystems] reduce udev errors by not triggering NVMe rule on partitions Use new hardware.block.defaultSchedulerRotational for hddScheduler --- filesystems.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filesystems.nix b/filesystems.nix index 205ed80..4e4b7df 100644 --- a/filesystems.nix +++ b/filesystems.nix @@ -68,6 +68,7 @@ in boot.supportedFilesystems = [ "ntfs" "ext4" "vfat" "exfat" ]; + hardware.block.defaultSchedulerRotational = mkDefault cfg.hddScheduler; aviallon.filesystems.udevRules = mkBefore (concatLists [ (optional (!(builtins.isNull cfg.hddScheduler)) ''ACTION!="remove", SUBSYSTEM=="block", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="${cfg.hddScheduler}"'' @@ -75,8 +76,8 @@ in (optional (!(builtins.isNull cfg.slowFlashScheduler)) '' SUBSYSTEM!="block", GOTO="aviallon_slowflash_end" - KERNEL!="sd[a-z]|nvme[0-9]*n[0-9]*|mmcblk[0-9]", GOTO="aviallon_slowflash_end" - ATTR{queue/rotational}!="0", GOTO="aviallon_slowflash_end" + KERNEL!="sd[a-z]|nvme[0-9]*n[0-9]|mmcblk[0-9]", GOTO="aviallon_slowflash_end" + ATTR{queue/rotational}=="1", GOTO="aviallon_slowflash_end" ACTION!="remove", ATTR{queue/scheduler}="${cfg.slowFlashScheduler}"