From eeb15830e9cd16ae75fe9743361033bd3f30acc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 18 Aug 2022 08:41:35 +0200 Subject: nixos/modules/generic: enable BFQ for block devices --- nixos/modules/generic.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'nixos/modules') diff --git a/nixos/modules/generic.nix b/nixos/modules/generic.nix index 74bc314..29c2155 100644 --- a/nixos/modules/generic.nix +++ b/nixos/modules/generic.nix @@ -55,7 +55,6 @@ in { htop iotop #glances mc screen tmux - #ncdu # ls tools tree @@ -118,6 +117,17 @@ in { time.timeZone = "Europe/Prague"; i18n.defaultLocale = "en_US.UTF-8"; + + services.udev.packages = [ + (pkgs.writeTextFile rec { + name = "bfq-drives.rules"; + destination = "/etc/udev/rules.d/60-${name}"; + text = '' + ACTION=="add|change", KERNEL=="sd*[!0-9]", ATTR{queue/scheduler}="bfq" + ACTION=="add|change", KERNEL=="nvme*n[0-9]", ATTR{queue/scheduler}="bfq" + ''; + }) + ]; }; } -- cgit v1.2.3