diff --git a/hosts/workstation/systemd.nix b/hosts/workstation/systemd.nix index 59d9f56..e12d31e 100644 --- a/hosts/workstation/systemd.nix +++ b/hosts/workstation/systemd.nix @@ -48,8 +48,28 @@ in { ''; serviceConfig = { Type = "oneshot"; }; }; + check-nic = { + description = "Adjust tailscale MTU based on location"; + unitConfig = { + Type = "simple"; + }; + serviceConfig = { + Type = "oneshot"; + Environment = + "PATH=/run/current-system/sw/bin:/etc/profiles/per-user/don/bin:/home/don/bin"; + ExecStart = "/home/don/bin/check-nic"; + }; + }; }; timers = { + check-nic = { + wantedBy = [ "timers.target" ]; + partOf = [ "check-nic.service" ]; + timerConfig = { + OnCalendar = "1m"; + Unit = "check-nic.service"; + }; + }; detect-reboot-for-upgrade = { wantedBy = [ "timers.target" ]; partOf = [ "detect-reboot-for-upgrade.service" ];