From 84e1f6cf345770e22d5b13322d7254880c7c387c Mon Sep 17 00:00:00 2001 From: Aly Raffauf Date: Wed, 26 Jun 2024 22:22:14 -0400 Subject: [PATCH] move power-profiles-daemon to hardwareModules --- hardwareModules/default.nix | 1 + .../laptop}/default.nix | 3 +-- nixosModules/base/default.nix | 1 - nixosModules/options.nix | 5 ----- 4 files changed, 2 insertions(+), 8 deletions(-) rename {nixosModules/base/power-profiles-daemon => hardwareModules/laptop}/default.nix (64%) diff --git a/hardwareModules/default.nix b/hardwareModules/default.nix index 790d8e9f..987d566b 100644 --- a/hardwareModules/default.nix +++ b/hardwareModules/default.nix @@ -7,6 +7,7 @@ inputs: { imports = [ ./cpu ./gpu + ./laptop ./options.nix ./ssd ]; diff --git a/nixosModules/base/power-profiles-daemon/default.nix b/hardwareModules/laptop/default.nix similarity index 64% rename from nixosModules/base/power-profiles-daemon/default.nix rename to hardwareModules/laptop/default.nix index 063875fd..5aabd283 100644 --- a/nixosModules/base/power-profiles-daemon/default.nix +++ b/hardwareModules/laptop/default.nix @@ -1,11 +1,10 @@ { config, - inputs, lib, pkgs, ... }: { - config = lib.mkIf config.ar.base.power-profiles-daemon.enable { + config = lib.mkIf config.ar.hardware.laptop { services = { power-profiles-daemon.enable = true; upower.enable = true; diff --git a/nixosModules/base/default.nix b/nixosModules/base/default.nix index ba7f2960..d7e1f433 100644 --- a/nixosModules/base/default.nix +++ b/nixosModules/base/default.nix @@ -10,7 +10,6 @@ ./nix ./nixpkgs ./plymouth - ./power-profiles-daemon ./sound ./zramSwap ]; diff --git a/nixosModules/options.nix b/nixosModules/options.nix index e1292376..8a285810 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -247,11 +247,6 @@ default = config.ar.base.enable; type = lib.types.bool; }; - power-profiles-daemon.enable = lib.mkOption { - description = "Power Profiles Daemon for power management."; - default = config.ar.base.enable; - type = lib.types.bool; - }; zramSwap = { enable = lib.mkOption { description = "zram swap.";