Help: Network magic on boot, or systemd one time script? (docker / macvlan)

It’s like rubber duck debugging - I keep answering my own questions.

$ which ip
/run/current-system/sw/bin/ip

$ ls -l /run/current-system/sw/bin/ip
lrwxrwxrwx 6 root root 66 Dec 31  1969 /run/current-system/sw/bin/ip -> /nix/store/69c1w82hwk2ki1xapdci0hdsvrhl232g-iproute2-6.14.0/bin/ip

From this I can squint and figure out that the package is iproute2

This let’s me path it in the systemd setup … thus

systemd.services.macvlan-host-routing = {
    serviceConfig.Type = "oneshot";
    wantedBy = [ "docker.service" ];
    script = ''
      ${pkgs.iproute2}/bin/ip link add myNewNet-shim link enp3s0 type macvlan mode bridge;
      ${pkgs.iproute2}/bin/ip addr add 192.168.1.67/32 dev myNewNet-shim;
      ${pkgs.iproute2}/bin/ip link set myNewNet-shim up;
      ${pkgs.iproute2}/bin/ip route add 192.168.1.64/30 dev myNewNet-shim;
    '';
  };

Will work… but is it the best approach with NixOS?