aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-08-18 08:41:35 +0200
committerKarel Kočí <cynerd@email.cz>2022-08-18 08:41:35 +0200
commiteeb15830e9cd16ae75fe9743361033bd3f30acc1 (patch)
treeec8ef0420a87e9c25e2d577c0632e7cc3856e0d0 /nixos
parent2a7fb572b964b93bd4f211cff52caddb459d0954 (diff)
downloadnixos-personal-eeb15830e9cd16ae75fe9743361033bd3f30acc1.tar.gz
nixos-personal-eeb15830e9cd16ae75fe9743361033bd3f30acc1.tar.bz2
nixos-personal-eeb15830e9cd16ae75fe9743361033bd3f30acc1.zip
nixos/modules/generic: enable BFQ for block devices
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/generic.nix12
1 files changed, 11 insertions, 1 deletions
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"
+ '';
+ })
+ ];
};
}