From 1b1d754950604f36922d1a8d5a04907f251fa507 Mon Sep 17 00:00:00 2001 From: Syed Daanish Date: Thu, 9 Jul 2026 13:53:54 +0100 Subject: [PATCH] Make hibernation and suspend work --- home/kitty/default.nix | 3 --- home/kutu/scripts/power.sh | 4 ++-- home/tardis.nix | 2 +- modules/workstation/graphics.nix | 12 ++++++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/home/kitty/default.nix b/home/kitty/default.nix index a69ebd9..e04df14 100644 --- a/home/kitty/default.nix +++ b/home/kitty/default.nix @@ -32,9 +32,6 @@ window_margin_width = 8; - allow_remote_control = "yes"; - listen_on = "unix:/tmp/mykitty"; - foreground = "#CDD6F4"; background = "#080014"; selection_foreground = "#080014"; diff --git a/home/kutu/scripts/power.sh b/home/kutu/scripts/power.sh index 5e60d9d..69e0dba 100644 --- a/home/kutu/scripts/power.sh +++ b/home/kutu/scripts/power.sh @@ -28,13 +28,13 @@ case "$sel" in *Hibernate*) confirm=$(printf "No\nYes" | dmenu -i -p "Are you sure you want to hibernate? :" \ -nf '#e0af68' -nb '#1f2335' -sb '#f7768e' -sf '#1a1b26' -fn 'AgaveNerdFont-16') - [ "$confirm" = "Yes" ] && exec systemctl hibernate + [ "$confirm" = "Yes" ] && exec systemctl --system hibernate ;; *Stop\ KutuWM*) exec kutu-run.rb stop ;; *Suspend*) - exec systemctl suspend + exec systemctl --system suspend ;; *Lock*) ~/dotfiles/scripts/lock.sh & diff --git a/home/tardis.nix b/home/tardis.nix index a686677..7879794 100644 --- a/home/tardis.nix +++ b/home/tardis.nix @@ -21,7 +21,7 @@ in home.file.".xinitrc".text = '' if [ -f ~/.xsession ]; then - exec ~/.xsession + exec dbus-run-session ~/.xsession fi ''; diff --git a/modules/workstation/graphics.nix b/modules/workstation/graphics.nix index 1ec4dda..1564f13 100644 --- a/modules/workstation/graphics.nix +++ b/modules/workstation/graphics.nix @@ -5,15 +5,19 @@ "nouveau" ]; - boot.kernelParams = [ "video=efifb:1920x1080" ]; - - boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ]; + boot.kernelParams = [ + "mem_sleep_default=deep" + "video=efifb:1920x1080" + "nvidia.NVreg_TemporaryFilePath=/var/tmp" + ]; hardware.graphics.enable = true; hardware.nvidia = { modesetting.enable = true; - open = true; + powerManagement.enable = true; + nvidiaSettings = true; + open = false; prime = { offload = { enable = true;