From 577b6e951c5104c047c21561b897265679d8a2b6 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 27 Aug 2023 15:21:27 +0900 Subject: [PATCH] Testing autosuspend --- nixos/common/desktops/hyprland/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/common/desktops/hyprland/default.nix b/nixos/common/desktops/hyprland/default.nix index 4295e1e5..efd33fbe 100644 --- a/nixos/common/desktops/hyprland/default.nix +++ b/nixos/common/desktops/hyprland/default.nix @@ -43,6 +43,19 @@ IdleAction=suspend-then-hibernate ''; + systemd.sleep.extraConfig = '' + AllowSuspend = yes + AllowHibernate = yes + AllowSuspendThenhibernate = yes + AllowHybridSleep = yes + + HibernateDelaySec = 600 + ''; + + systemd.autosuspend = { + enable = true; + }; + # XDG portal xdg.portal.enable = true; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];