diff --git a/flake.lock b/flake.lock index c01505c..a3d4525 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "auto-cpufreq": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733175750, + "narHash": "sha256-tczSI0dnsitstia/uVt7FyGQbtuW8lMhhMYj0TRSAT4=", + "owner": "AdnanHodzic", + "repo": "auto-cpufreq", + "rev": "4dae1d4b59bedc1d57118a9eb704c2e1cde5f83c", + "type": "github" + }, + "original": { + "owner": "AdnanHodzic", + "repo": "auto-cpufreq", + "type": "github" + } + }, "base16": { "inputs": { "fromYaml": "fromYaml" @@ -175,6 +195,7 @@ }, "root": { "inputs": { + "auto-cpufreq": "auto-cpufreq", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "stylix": "stylix" @@ -201,11 +222,11 @@ "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1734885904, - "narHash": "sha256-NxA4JnLuXyle2/nUKDbW8vORwSd+Z20limIl7DhlZbs=", + "lastModified": 1735253599, + "narHash": "sha256-aKLAUkdeMH2N5gMDNiOC7KghRNy1necLtLa9+zUcj1g=", "owner": "danth", "repo": "stylix", - "rev": "4d87b96ceca38532f39c1b7efd8a9235bfcee3d6", + "rev": "963e77a3a4fc2be670d5a9a6cbeb249b8a43808a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a523252..413cdfd 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,10 @@ home-manager.follows = "home-manager"; }; }; + auto-cpufreq = { + url = "github:AdnanHodzic/auto-cpufreq"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { @@ -35,6 +39,7 @@ }; modules = [ ./hosts/${host}/config.nix + inputs.auto-cpufreq.nixosModules.default inputs.stylix.nixosModules.stylix home-manager.nixosModules.home-manager { diff --git a/hosts/default/config.nix b/hosts/default/config.nix index ec7f72b..7a83c62 100644 --- a/hosts/default/config.nix +++ b/hosts/default/config.nix @@ -229,6 +229,20 @@ in { remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; }; + auto-cpufreq = { + enable = true; + settings = { + charger = { + governor = "performance"; + turbo = "auto"; + }; + + battery = { + governor = "powersave"; + turbo = "auto"; + }; + }; + }; thunar = { enable = true; plugins = with pkgs.xfce; [ @@ -328,6 +342,7 @@ in { bastet nsnake exiftool + # auto-cpufreq ]; fonts = { @@ -411,6 +426,7 @@ in { # pkgs.hplipWithPlugin ]; }; + # auto-cpufreq.enable = true; gnome.gnome-keyring.enable = true; avahi = { enable = true; diff --git a/hosts/garand-laptop/config.nix b/hosts/garand-laptop/config.nix index ec7f72b..7a83c62 100644 --- a/hosts/garand-laptop/config.nix +++ b/hosts/garand-laptop/config.nix @@ -229,6 +229,20 @@ in { remotePlay.openFirewall = true; dedicatedServer.openFirewall = true; }; + auto-cpufreq = { + enable = true; + settings = { + charger = { + governor = "performance"; + turbo = "auto"; + }; + + battery = { + governor = "powersave"; + turbo = "auto"; + }; + }; + }; thunar = { enable = true; plugins = with pkgs.xfce; [ @@ -328,6 +342,7 @@ in { bastet nsnake exiftool + # auto-cpufreq ]; fonts = { @@ -411,6 +426,7 @@ in { # pkgs.hplipWithPlugin ]; }; + # auto-cpufreq.enable = true; gnome.gnome-keyring.enable = true; avahi = { enable = true;