[Unit]
Description=Keyboard repeat rate in tty.[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=tty
StandardOutput=tty
ExecStart=/usr/bin/kbdrate -s -d 500 -r 2[Install]
WantedBy=multi-user.target
What happens if you change this line to WantedBy=cryptsetup-pre.target
That should get systemd to try to execute it before running cryptsetup.
You may also need to add a dracut module to pull in the relevant
executables, but try the above first.
https://people.redhat.com/harald/dracut.html#id490050