diff --git a/configuration.nix b/configuration.nix index 8da7934..7d6f7cc 100644 --- a/configuration.nix +++ b/configuration.nix @@ -134,20 +134,13 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Power management for laptop - # Configure lid switch behavior - hybrid-sleep with 1-minute delay to hibernate + # Configure lid switch behavior - hybrid-sleep for optimal power management services.logind = { lidSwitch = "hybrid-sleep"; lidSwitchExternalPower = "hybrid-sleep"; lidSwitchDocked = "ignore"; }; - # Configure suspend-then-hibernate delay (in seconds) - # This controls how long to stay in suspend before hibernating - # 60 seconds = 1 minute - systemd.sleep.extraConfig = '' - HibernateDelaySec=60 - ''; - # Enable auto-cpufreq for intelligent power management (replaces TLP) services.auto-cpufreq.enable = true; services.auto-cpufreq.settings = { diff --git a/hardware-configuration.nix b/hardware-configuration.nix index eb976ee..d5b4b01 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -24,7 +24,14 @@ options = [ "fmask=0077" "dmask=0077" ]; }; - swapDevices = [ ]; + # Add swap file for hibernation support + # This creates a 96GB swap file to match your RAM capacity + swapDevices = [ + { + device = "/swapfile"; + size = 98304; # 96GB in MB + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's