diff --git a/flake.nix b/flake.nix index 060bd07e..7015787d 100644 --- a/flake.nix +++ b/flake.nix @@ -241,6 +241,7 @@ bugs = [ "intel-hdmi" "suspend-hibernate-no-platform" "hibernate-iwlwifi" "suspend-lid-no-wakeup" "xmunet" + "suspend-hibernate-waydroid" ]; };}) ]; diff --git a/modules/bugs/default.nix b/modules/bugs/default.nix index 8d6612eb..3c9ae704 100644 --- a/modules/bugs/default.nix +++ b/modules/bugs/default.nix @@ -50,6 +50,28 @@ inputs: { wpa_supplicant = pkgs.wpa_supplicant.overrideAttrs (attrs: { patches = attrs.patches ++ [ ./xmunet.patch ];}); }; + suspend-hibernate-waydroid.systemd.services = + let + systemctl = "${inputs.pkgs.systemd}/bin/systemctl"; + in + { + "waydroid-hibernate" = + { + description = "waydroid hibernate"; + wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; + before = [ "systemd-hibernate.service" "systemd-suspend.service" ]; + serviceConfig.Type = "oneshot"; + script = "${systemctl} stop waydroid-container"; + }; + "waydroid-resume" = + { + description = "waydroid resume"; + wantedBy = [ "systemd-hibernate.service" "systemd-suspend.service" ]; + after = [ "systemd-hibernate.service" "systemd-suspend.service" ]; + serviceConfig.Type = "oneshot"; + script = "${systemctl} start waydroid-container"; + }; + }; }; in {