feat: nb battery improvement
This commit is contained in:
@@ -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"; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user