Try to improve battery life on rainbowdash

This commit is contained in:
Artemis Tosini 2023-11-22 18:31:51 +00:00
parent 6d5a1145a8
commit 2188b7595b
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
5 changed files with 43 additions and 24 deletions

View file

@ -201,11 +201,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1700261686, "lastModified": 1700553346,
"narHash": "sha256-kplQg6hKFNuWKrOyGp9D//G/WH1nHGJ43r2m7fagTYY=", "narHash": "sha256-kW7uWsCv/lxuA824Ng6EYD9hlVYRyjuFn0xBbYltAeQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ecd0a800f716b80a6eac58a7ac34d6d33e6fa5ee", "rev": "1aabb0a31b25ad83cfaa37c3fe29053417cd9a0f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -250,11 +250,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1699760693, "lastModified": 1700363379,
"narHash": "sha256-u/gkNUHQR/q23voqE5J4xmEWQIAqR+g3lUnCtzn0k7Y=", "narHash": "sha256-fBEVPFwSZ6AmBE1s1oT7E9WVuqRghruxTnSQ8UUlMkw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "8aff4ca3dee60d1422489fe8d52c2f837b3ad113", "rev": "27920146e671a0d565aaa7452907383be14d8d82",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -265,11 +265,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1700315735, "lastModified": 1700559156,
"narHash": "sha256-zlSLW6dX5XwBEwN87CIVtMr8zDSKvTRFmWmIQ9FfWgo=", "narHash": "sha256-gL4epO/qf+wo30JjC3g+b5Bs8UrpxzkhNBBsUYxpw2g=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "1721da31f9b30cbf4460c4ec5068b3b6174a4694", "rev": "c3abafb01cd7045dba522af29b625bd1e170c2fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -280,11 +280,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1700204040, "lastModified": 1700390070,
"narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=", "narHash": "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad", "rev": "e4ad989506ec7d71f7302cc3067abd82730a4beb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -338,11 +338,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1700240304, "lastModified": 1700659845,
"narHash": "sha256-nR5Ot2nN0msfGD1Vj76/4zb6+5ksJ28gfsit/BhK/oA=", "narHash": "sha256-nU3fHWd/YKPtnJ+PVqtooVNlFtkSQIfrsq14wyufUXA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "440c449c0a13f7864bb8406baf19f4e9f61abc55", "rev": "796e7391cec5134fd36951d275e7a0809e2107c8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -390,11 +390,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1699271226, "lastModified": 1700064067,
"narHash": "sha256-8Jt1KW3xTjolD6c6OjJm9USx/jmL+VVmbooADCkdDfU=", "narHash": "sha256-1ZWNDzhu8UlVCK7+DUN9dVQfiHX1bv6OQP9VxstY/gs=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "ea758da1a6dcde6dc36db348ed690d09b9864128", "rev": "e558068cba67b23b4fbc5537173dbb43748a17e8",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,10 +3,7 @@
{ {
imports = [ ./wifi.nix ]; imports = [ ./wifi.nix ];
services = { services.upower.enable = true;
tlp.enable = true;
upower.enable = true;
};
programs.light.enable = true; programs.light.enable = true;
users.users.artemis.extraGroups = [ "video" ]; users.users.artemis.extraGroups = [ "video" ];

View file

@ -3,6 +3,7 @@
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
wifi.macAddress = "stable"; wifi.macAddress = "stable";
wifi.backend = "iwd";
}; };
users.users.artemis.extraGroups = [ "networkmanager" ]; users.users.artemis.extraGroups = [ "networkmanager" ];
} }

View file

@ -31,7 +31,6 @@
nssmdns = true; nssmdns = true;
}; };
flatpak.enable = true; flatpak.enable = true;
fwupd.enable = true;
pcscd.enable = true; pcscd.enable = true;
printing.enable = true; printing.enable = true;
udev.packages = [ (pkgs.callPackage ../externals/rules/uhk.nix { }) ]; udev.packages = [ (pkgs.callPackage ../externals/rules/uhk.nix { }) ];

View file

@ -13,8 +13,11 @@
../../sets/virtualization.nix ../../sets/virtualization.nix
../../sets/workstation.nix ../../sets/workstation.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-gpu-intel
inputs.nixos-hardware.nixosModules.common-pc-laptop inputs.nixos-hardware.nixosModules.common-pc-laptop
inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call inputs.nixos-hardware.nixosModules.common-pc-laptop-acpi_call
inputs.nixos-hardware.nixosModules.common-pc-ssd
]; ];
boot.supportedFilesystems = [ "nfs4" ]; boot.supportedFilesystems = [ "nfs4" ];
@ -57,7 +60,26 @@
hardware.opengl.extraPackages = with pkgs; [ intel-compute-runtime ]; hardware.opengl.extraPackages = with pkgs; [ intel-compute-runtime ];
boot.blacklistedKernelModules = [ "psmouse" ]; boot.blacklistedKernelModules = [ "psmouse" ];
services.thermald.enable = true; hardware.enableRedistributableFirmware = true;
services = {
fwupd.enable = true;
thermald.enable = true;
tlp.enable = true;
tlp.settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "low-power";
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
RUNTIME_ASPM_ON_AC = "default";
RUNTIME_ASPM_ON_BAT = "powersave";
CPU_DRIVER_OPMODE_ON_AC = "passive";
CPU_DRIVER_OPMODE_ON_BAT = "passive";
CPU_SCALING_GOVERNOR_ON_AC = "schedutil";
CPU_SCALING_GOVERNOR_ON_BAT = "schedutil";
};
};
networking.domain = "manehattan.artem.ist"; networking.domain = "manehattan.artem.ist";
networking.hostName = "rainbowdash"; networking.hostName = "rainbowdash";