From adc8eb86617a0ffb5d859974150af9498724506b Mon Sep 17 00:00:00 2001 From: Andre Date: Fri, 6 Dec 2024 16:29:13 -0500 Subject: [PATCH] General: replace auto-cpufreq with power-profiles-daemon --- flake.lock | 22 ---------------------- flake.nix | 7 ------- modules/nixos/system/default.nix | 6 +++--- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/flake.lock b/flake.lock index fbb14cc..523be46 100644 --- a/flake.lock +++ b/flake.lock @@ -1,26 +1,5 @@ { "nodes": { - "auto-cpufreq": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1725514537, - "narHash": "sha256-Xsh3d7rQY7RKzZ7J0swrgxZEyITb7B3oX5F/tcBGjfk=", - "owner": "AdnanHodzic", - "repo": "auto-cpufreq", - "rev": "a42e8fb51e08059411d52451141cac86f1bc788a", - "type": "github" - }, - "original": { - "owner": "AdnanHodzic", - "ref": "v2.4.0", - "repo": "auto-cpufreq", - "type": "github" - } - }, "crane": { "inputs": { "nixpkgs": [ @@ -414,7 +393,6 @@ }, "root": { "inputs": { - "auto-cpufreq": "auto-cpufreq", "flatpak": "flatpak", "home-manager": "home-manager", "lanzaboote": "lanzaboote", diff --git a/flake.nix b/flake.nix index 728d1e2..6ceabdf 100644 --- a/flake.nix +++ b/flake.nix @@ -10,12 +10,6 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - # Power management via auto-cpufreq - auto-cpufreq = { - url = "github:AdnanHodzic/auto-cpufreq/v2.4.0"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - # Flatpak support flatpak.url = "github:gmodena/nix-flatpak/v0.5.1"; @@ -86,7 +80,6 @@ systems = { # Modules to import for all systems modules.nixos = with inputs; [ - auto-cpufreq.nixosModules.default lix.nixosModules.default lanzaboote.nixosModules.lanzaboote flatpak.nixosModules.nix-flatpak diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index c0a134c..4fdf75b 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -51,9 +51,9 @@ in # Install base packages environment.systemPackages = cfg.corePackages ++ cfg.packages; - # Configure power management via auto-cpufreq - # https://github.com/AdnanHodzic/auto-cpufreq - programs.auto-cpufreq.enable = cfg.powerManagement.enable; + # Configure power management via power-profiles-daemon + # https://gitlab.freedesktop.org/upower/power-profiles-daemon + services.power-profiles-daemon.enable = cfg.powerManagement.enable; services = { # Automatically set the timezone based on location