Here is my config and homeall for my CubeX Duo should be similar.
I also have the same for my Trio with a Z probe if you need that.
; Joe config file for dc42 DuetWiFi firmware
;General Preferences
M111 S0 ; Debug off
G21 ; Work in millimeters
G90 ; Send absolute coordinates…
M83 ; ...but relative extruder moves
M555 P2 ; Set output to look like Marlin
M208 X0 Y0 Z0 S1;set axis minimum (adjust to make X=0 the edge of the bed)
M208 X270 Y270 Z200 ; Set axis maxima
M575 P1 B57600 S1
;Endstops
M574 X1 S0 ;set endstop configuration (Y endstop only, at low end, active high)
M574 Y2 S0 ;set endstop configuration (Y endstop only, at low end, active high)
M574 Z1 S1
;*** If you have a modulated IR probe with on-board microcontroller, change P2 to P1 in the following
;M558 P1 X25 Y250 Z1 H3 F200 T5000 ; smart IR Z probe, used for homing Z axis only, dive height 3mm, probe speed 200mm/min, travel speed 5000mm/min
;G31 P534 X25 Y250 Z1.80 ; set threshold and offsets
;M558 P1 F300 ; Use a simple modulated Z probe (change to P1 for an intelligent Z probe)
;G31 Z2.87 P534 ; Set the probe height and threshold (put your own values here)
;Drives
M584 X0 Y2 Z1 ;Axis Remaping
M569 P0 S0 ; (X axis) Drive 0 goes reverse (change to S1 to reverse it)
M569 P1 S1 ; (Y axis) Drive 1 goes forwards
M569 P2 S1 ; (Z axis) Drive 2 goes forwards
M569 P3 S1 ; (Extruder 1) Drive 3 goes forwards
M569 P4 S0 ; (Extruder 2) Drive 4 goes forwards
M92 X87.58 Y87.58 Z1066 E80.02:398.0 ; Set axis steps/mm
M566 X800 Y800 Z200 E500 ; Minimum speeds mm/minute
M203 X6000 Y3200 Z800 E1000 ; Maximum speeds (mm/min)
M201 X250 Y250 Z250 E250 ; Accelerations (mm/s^2)
M906 X1300 Y1600 Z1300 E1600 ; Set motor currents (mA)
;M572 D0 S0 ;Pressure Advance
;M572 D1 S0 ;Pressure Advance
M84 S30 ;Set idle timeout
;Heaters
M302 P1 ;Allow cold extuder
M143 H1 S301 ; Set maximum heater temperature to 300C
M143 H2 S301 ; Set maximum heater temperature to 300C
M307 H1 A270.2 C118.0 D2.7 S1.00
M307 H2 A365.3 C138.2 D4.6 S1.00
M305 P0 T100000 B4388 C0 R4700 ; Set thermistor + ADC parameters for heater 0
M305 P1 T100000 B4388 C0 R4700 H75 L0 ; Set thermistor + ADC parameters for heater 1
M305 P2 T100000 B4388 C0 R4700 H0 L0 ; Set thermistor + ADC parameters for heater 2
;Tools
M563 P0 D0 H1 ; Define tool 1
G10 P0 S0 R0 X-42 Y1.20 ; Set tool 1 operating and standby temperatures
M563 P1 D1 H2 ; Define tool 2
G10 P1 S0 R0 X0 Y0 ; Set tool 2 operating and standby temperatures
; Network
M550 PDuet WiFi Duo ; Set machine name
M552 S1 ; Enable network and acquire dynamic address via DHCP
; Fans
M106 P1 T45 H1 ; Hot end fan 1 will turn on when temp reaches 45 degrees
M106 P2 T45 H2 ; Hot end fan 2 will turn on when temp reaches 45 degrees
M106 P3 S255
;T0 ; select first hotend
Homeall
; X axis homing file for dc42 Duet firmware
G91
G1 Z2 F500
G1 X-270 Y270 F2000 S1
G90
G1 X10 Y235 F2000
G91 ; relative mode
G1 Z-200 S1 F500 ; move Z up until the switch triggers
G1 Z2
G90 ; back to absolute mode