From 7cb1698467062aa128901c2d9ec27ab98e713185 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Tue, 19 Mar 2024 17:10:34 +0100 Subject: [PATCH] fixup! fixup! fixup! WIP: hyper: Init --- machines/hyper/hardware-configuration.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/machines/hyper/hardware-configuration.nix b/machines/hyper/hardware-configuration.nix index 98c44e6..f2a6dcf 100644 --- a/machines/hyper/hardware-configuration.nix +++ b/machines/hyper/hardware-configuration.nix @@ -46,6 +46,26 @@ }; }; + # https://www.reddit.com/r/gigabyte/comments/p5ewjn/b550i_pro_ax_f13_bios_sleep_issue_on_linux/ + systemd.services.suspend-fix = { + wantedBy = [ "multi-user.target" ]; + description = "Fix suspend"; + + script = '' + if grep -q "GPP0 .* \*enabled" /proc/acpi/wakeup; then + echo GPP0 > /proc/acpi/wakeup + echo "Disabled wakeup for GPP0" + else + echo "Wakeup for GPP0 already disabled" + fi + ''; + + serviceConfig = { + Type = "oneshot"; + }; + }; + + fileSystems = { "/" = { device = "/dev/disk/by-uuid/53f4e762-39fa-41a6-8b78-4999d38e6e88";