Disable the Power button on a Chromebook

I found your solution on the Arch wiki:

Out of the box, systemd-logind will catch power key and lid switch events and handle them: it will shut down the Chromebook on a power key press, and a suspend on a lid close. However, this policy might be a bit harsh given that the power key is an ordinary key at the top right of the keyboard that might be pressed accidentally.

To configure logind to ignore power key presses and lid switches, add the lines to logind.conf below.



Then restart logind for the changes to take effect.

It looks like you just need to add HandlePowerKey=ignore to /etc/systemd/logind.conf.