diff --git a/nixos/machines/dfinity-blade15.nix b/nixos/machines/dfinity-blade15.nix index 35f03b96..6cc4818a 100644 --- a/nixos/machines/dfinity-blade15.nix +++ b/nixos/machines/dfinity-blade15.nix @@ -32,6 +32,18 @@ fsType = "vfat"; }; + systemd.services.resume-fix = { + description = "Fixes acpi immediate resume after suspend"; + wantedBy = [ "multi-user.target" "post-resume.target" ]; + after = [ "multi-user.target" "post-resume.target" ]; + script = '' + if ${pkgs.gnugrep}/bin/grep -q '\bXHC\b.*\benabled\b' /proc/acpi/wakeup; then + echo XHC > /proc/acpi/wakeup + fi + ''; + serviceConfig.Type = "oneshot"; + }; + swapDevices = [ ]; networking.hostName = "ivanm-dfinity-razer";