It would be great to implement allow-sleep on Linux. There are APIs for both the systemd mode and the desktop mode.
When running in desktop mode, one should use the Inhibit XDG portal D-Bus API:
When running as a system, one should use systemd-inhibit -DBus API: inhibit
Thanks for all the hard work!
Hi @ocrete, welcome to the forum 
I agree, it seems this was never added.
I have registered an issue for this.