From dcd6c324fbb75d9861bc07029d9cfb14aafcb394 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 23 Jan 2023 20:53:21 +0530 Subject: more power management --- home.nix | 3 ++- hosts/myrtle/configuration.nix | 57 +++++++++++++++++++++--------------------- programs/tmux.nix | 4 +-- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/home.nix b/home.nix index 6c5fa20..399db78 100644 --- a/home.nix +++ b/home.nix @@ -60,8 +60,9 @@ cudatoolkit pciutils - # x + # input xinput_calibrator + touchegg # meta nixpkgs-review 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"; diff --git a/programs/tmux.nix b/programs/tmux.nix index 5bc5355..15f9a13 100644 --- a/programs/tmux.nix +++ b/programs/tmux.nix @@ -82,7 +82,7 @@ in setw -g pane-base-index 1 # session jumper - bind-key j display-popup -E "\ + bind C-j display-popup -E "\ tmux list-sessions -F '#{session_name}' |\ fzf |\ xargs tmux switch-client -t" @@ -128,7 +128,7 @@ in set -g pane-active-border-style fg=colour8 set-option -g status-justify absolute-centre - set-option -g status-position bottom + set-option -g status-position top set -g window-status-current-format " #[fg=colour15]#W#{?window_zoomed_flag, #[fg=colour2]+,}#{?window_activity_flag, #[fg=colour3]!,}" set -g window-status-format " #[fg=colour8]#W#{?window_zoomed_flag, #[fg=colour2]+,}" -- cgit v1.2.3