fix(homie): add temp fix for losing internet
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-02-10 12:54:06 -05:00
parent 8edc73cd41
commit f68fcce055

View file

@ -1,5 +1,6 @@
{
mainUser,
pkgs,
self,
...
}: {
@ -38,6 +39,30 @@
firewall.enable = false;
};
# FIXME: temporary fix while I figure out the issue with the Network Card?
systemd.services."temp-fix-nic" = {
wantedBy = ["multi-user.target"];
after = ["tailscaled.service"];
path = [pkgs.ripgrep];
script = ''
# Wait for boot to finish
sleep 60
echo "start listening to journalctl"
journalctl -fb | while read -r line; do
if echo "$line" | rg 'NIC Link is Up' &> /dev/null; then
echo "restarting tailscaled"
systemctl restart tailscaled.service
fi
done
'';
serviceConfig = {
User = "root";
AmbientCapabilities = "CAP_SYS_ADMIN CAP_SYSLOG";
};
};
time.timeZone = "America/Montreal";
# ------------------------------------------------