diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/hardware.nix | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/modules/hardware.nix b/modules/hardware.nix index f936109..5a20353 100644 --- a/modules/hardware.nix +++ b/modules/hardware.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, modulesPath, ... }: +{ lib, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") @@ -18,6 +18,22 @@ }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + # Power/power state + powerManagement = { + enable = true; + cpuFreqGovernor = "powersave"; + }; + services.acpid.enable = true; + services.logind = { + powerKey = "ignore"; + rebootKey = "ignore"; + lidSwitch = "ignore"; + lidSwitchDocked = "ignore"; + lidSwitchExternalPower = "ignore"; + hibernateKey = "ignore"; + suspendKey = "ignore"; + }; + # Bootloader boot.loader = { systemd-boot = { @@ -47,8 +63,4 @@ swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; networking.useDHCP = lib.mkDefault true; - powerManagement = { - enable = true; - cpuFreqGovernor = "powersave"; - }; } |
