Using a separate service
Tip: These steps can be automated by installing the systemd-numlockonttyAUR package and enabling the numLockOnTty service.
First create a script to set the numlock on relevant TTYs:
/usr/local/bin/numlock
#!/bin/bash
for tty in /dev/tty{1..6}
do
/usr/bin/setleds -D +num < "$tty";
done
Once the script is created, you will need to make it executable. Otherwise the script cannot run.
Then create and enable a systemd service:
/etc/systemd/system/numlock.service
[Unit]
Description=numlock
[Service]
ExecStart=/usr/local/bin/numlock
StandardInput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target