Behaviour of physical power button on NUC

I’ve got HAOS running on my HP Thin Client and want to configure it in such a way that I can shutdown Home Assistant by pressing the physical power button that is on the device (in order to unplug it safely when desired). Is there any way on how to do that?

So far I haven’t been albe to find anything online.

For the record, I’m running HAOS bare metal on x86

What happens when you push it now? As it is a thin-client it might be different, normally the OS has some ways to control it, since HAOS is stripped, it might be more difficult.

Eg on redhat: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/administering_the_system_using_the_gnome_desktop_environment/changing-the-power-button-behavior_administering-the-system-using-the-gnome-desktop-environment

Eg on Debian:
https://wiki.debian.org/ConfigurePowerButton

Other info:
https://www.baeldung.com/linux/power-button-behavior

You are looking at an ACPI event in Linux.