mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Filesystems] reduce udev errors by not triggering NVMe rule on partitions
Use new hardware.block.defaultSchedulerRotational for hddScheduler
This commit is contained in:
parent
db87939151
commit
eeb148bb21
1 changed files with 3 additions and 2 deletions
|
|
@ -68,6 +68,7 @@ in
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "ntfs" "ext4" "vfat" "exfat" ];
|
boot.supportedFilesystems = [ "ntfs" "ext4" "vfat" "exfat" ];
|
||||||
|
|
||||||
|
hardware.block.defaultSchedulerRotational = mkDefault cfg.hddScheduler;
|
||||||
aviallon.filesystems.udevRules = mkBefore (concatLists [
|
aviallon.filesystems.udevRules = mkBefore (concatLists [
|
||||||
(optional (!(builtins.isNull cfg.hddScheduler))
|
(optional (!(builtins.isNull cfg.hddScheduler))
|
||||||
''ACTION!="remove", SUBSYSTEM=="block", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="${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))
|
(optional (!(builtins.isNull cfg.slowFlashScheduler))
|
||||||
''
|
''
|
||||||
SUBSYSTEM!="block", GOTO="aviallon_slowflash_end"
|
SUBSYSTEM!="block", GOTO="aviallon_slowflash_end"
|
||||||
KERNEL!="sd[a-z]|nvme[0-9]*n[0-9]*|mmcblk[0-9]", 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"
|
ATTR{queue/rotational}=="1", GOTO="aviallon_slowflash_end"
|
||||||
|
|
||||||
ACTION!="remove", ATTR{queue/scheduler}="${cfg.slowFlashScheduler}"
|
ACTION!="remove", ATTR{queue/scheduler}="${cfg.slowFlashScheduler}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue