Credit to https://blog.shahada.abubakar.net/post/adding-end-stops-limit-switches-to-the-3018-woodpecker-cnc-router as I used it as the base.
My CNC is already modified like https://www.thingiverse.com/thing:3046185
I don't know if the stock X-Axies is compatible with this setup.
Wire your homing switches to the designated Header on the control board. for Xen and Yen take the left one if you want the home switches mounted left and in the front.
Use A5 as a Z-Probe to zero your Z-Axies.
Use A0 as a Emergency Stop.
You have to configure the GRBL firmware as follows:
$$ in the command line, a list of settings will appear. Copy the text and save as a backup!
$27=2. Verify the settings with
$$ afterwards. Depending on the type of your switches 2mm pull off might not be enough. Depending on the side you install the homing switch you can flip the diretion in the homing dir invert mask.