From dcd6c324fbb75d9861bc07029d9cfb14aafcb394 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 23 Jan 2023 20:53:21 +0530 Subject: more power management --- hosts/myrtle/configuration.nix | 57 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 28 deletions(-) (limited to 'hosts') diff --git a/hosts/myrtle/configuration.nix b/hosts/myrtle/configuration.nix index ff64e80..7a7d9d1 100644 --- a/hosts/myrtle/configuration.nix +++ b/hosts/myrtle/configuration.nix @@ -91,51 +91,52 @@ package = pkgs.pulseaudioFull; # extraConfig = "load-module module-bluetooth-policy auto_switch=2"; }; - # opengl.enable = true; bluetooth = { enable = true; powerOnBoot = true; }; - # nvidia = { - # prime = { - # offload.enable = true; - # nvidiaBusId = "PCI:1:0:0"; - # intelBusId = "PCI:0:2:0"; - # }; - # }; }; - services.xserver = { - enable = true; - layout = "us"; - # videoDrivers = [ "nvidia" ]; - displayManager.startx.enable = true; - libinput.enable = true; - }; + services = { + xserver = { + enable = true; + layout = "us"; + # videoDrivers = [ "nvidia" ]; + displayManager.startx.enable = true; + libinput.enable = true; + }; - services.asusd = { - enable = true; - enableUserService = true; - }; - services.supergfxd.enable = true; + asusd = { + enable = true; + enableUserService = true; + }; + supergfxd.enable = true; - services.logind.extraConfig = '' - HandlePowerKey=suspend-then-hibernate - HandlePowerKeyLongPress=poweroff - ''; + logind.extraConfig = '' + HandlePowerKey=suspend-then-hibernate + HandlePowerKeyLongPress=poweroff + ''; - powerManagement.powertop.enable = true; - services.batteryNotifier = { + auto-cpufreq.enable = true; + batteryNotifier = { + enable = true; + notifyCapacity = 20; + suspendCapacity = 5; + }; + }; + + powerManagement = { enable = true; - notifyCapacity = 20; - suspendCapacity = 5; + powertop.enable = true; }; systemd.sleep.extraConfig = '' HibernateMode=shutdown ''; + virtualisation.docker.enable = true; + users.users.np = { isNormalUser = true; home = "/home/np"; -- cgit v1.2.3