I have xl2tpd daemon client which connects to remote server and I need to add routes after established connection. On traditional distros it’s enough to add commands to /etc/ppp/ip-up.local script, but on NixOS it doesn’t work.
I tried to add this:
networking.interfaces.ppp0.ipv4.routes = [{
address = "172.66.0.0";
prefixLength = 16;
via = "172.66.16.1";
}];
but it does not fit to ppp interfaces because of oneshot type.
Is there a propper way to add routes on ppp interface up?