I have a /etc/ifconfig.wg0 file that looks like this:
---8<---
192.168.222.1/24
!wgconfig ${int} set private-key /etc/wg/${int}
!wgconfig ${int} set listen-port 62345
!wgconfig ${int} add peer aHumanName crypticKeyCharacters=
--allowed-ips=192.168.222.2/32
up
--->8---
and everything else (routing etc) is done elsewhere.
This is for the "server" side of a wireguard connection and it is currently
unused (due to me changing ISP/network connection and not being done setting
everything up in the new environment), but I think it worked before.
Martin