From aa5e31a7f6bb79308f3dfd37ba8a9eed2a69135a Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Sun, 6 Jul 2025 00:56:06 -0400 Subject: [PATCH] enable hibernation --- dot_config/flake/machines/wash/configuration.nix | 8 ++++++++ dot_config/flake/machines/wash/hardware-configuration.nix | 3 +++ 2 files changed, 11 insertions(+) diff --git a/dot_config/flake/machines/wash/configuration.nix b/dot_config/flake/machines/wash/configuration.nix index b70aa42..1ad1f7c 100644 --- a/dot_config/flake/machines/wash/configuration.nix +++ b/dot_config/flake/machines/wash/configuration.nix @@ -109,6 +109,14 @@ services.flatpak.enable = true; + services.power-profiles-daemon.enable = true; + services.logind.lidSwitch = "suspend-then-hibernate"; + systemd.sleep.extraConfig = '' + HibernateDelaySec=30m + SuspendState=mem + ''; + boot.kernelParams = ["mem_sleep_default=deep"]; + # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/dot_config/flake/machines/wash/hardware-configuration.nix b/dot_config/flake/machines/wash/hardware-configuration.nix index 6ae3ebf..051ed98 100644 --- a/dot_config/flake/machines/wash/hardware-configuration.nix +++ b/dot_config/flake/machines/wash/hardware-configuration.nix @@ -11,8 +11,11 @@ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; + boot.resumeDevice = "/dev/disk/by-uuid/eac18653-6290-46d3-b925-c1974f2c8f48"; boot.extraModulePackages = [ ]; + powerManagement.enable = true; + fileSystems."/" = { device = "/dev/disk/by-uuid/16fd6400-4e28-4d88-8719-a76aa590f59c"; fsType = "ext4";