feat: nb battery improvement

This commit is contained in:
2025-10-19 12:01:45 +02:00
parent 019b1166ec
commit cb18e436ca
8 changed files with 83 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ in {
./modules/mcp-global.nix
./modules/ollama.nix
./modules/qdrant.nix
./modules/battery-brightness.nix
./cachix.nix
./users
@@ -74,7 +75,8 @@ in {
users.defaultUserShell = pkgs.zsh;
services.fwupd.enable = true;
services.irqbalance.enable = true;
# Disable irqbalance to save battery (not critical for laptop workloads)
services.irqbalance.enable = false;
swapDevices = [ {
device = "/nix/persist/swapfile";
@@ -87,6 +89,11 @@ in {
"vm.dirty_ratio" = 10;
"vm.dirty_background_ratio" = 5;
"vm.vfs_cache_pressure" = 50;
# Battery optimization - increase dirty writeback time to batch writes
"vm.dirty_writeback_centisecs" = 3000; # 30 seconds (default: 500 = 5s)
"vm.dirty_expire_centisecs" = 3000; # 30 seconds (default: 3000)
# Enable laptop mode for aggressive disk power management
"vm.laptop_mode" = 5;
};
# nixos cross building qemu
@@ -112,7 +119,7 @@ in {
};
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
hardware.bluetooth.powerOnBoot = false; # Save battery - enable manually when needed
hardware.bluetooth.settings = {
General = { ControllerMode = "bredr"; };
};