mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
systemd-networkd
This commit is contained in:
parent
e5a8797f1d
commit
e7ec8d1886
3 changed files with 34 additions and 9 deletions
|
|
@ -18,6 +18,14 @@ with lib; {
|
|||
trustedInterfaces = [config.services.tailscale.interfaceName];
|
||||
allowedUDPPorts = [config.services.tailscale.port];
|
||||
};
|
||||
systemd.network = {
|
||||
wait-online.ignoredInterfaces = [config.services.tailscale.interfaceName];
|
||||
networks."50-tailscale" = {
|
||||
networkConfig = {
|
||||
DNSDefaultRoute = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
|
|
@ -38,7 +46,9 @@ with lib; {
|
|||
# have the job run this shell script
|
||||
script = with pkgs; ''
|
||||
# wait for tailscaled to settle
|
||||
sleep 2
|
||||
sleep 5
|
||||
|
||||
resolvectl revert ${config.services.tailscale.interfaceName} || false
|
||||
|
||||
# check if we are already authenticated to tailscale
|
||||
status="$(${getExe tailscale} status -json | ${getExe jq} -r .BackendState)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue