fix(homie): add temp fix for losing internet
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
8edc73cd41
commit
f68fcce055
1 changed files with 25 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
mainUser,
|
mainUser,
|
||||||
|
pkgs,
|
||||||
self,
|
self,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
@ -38,6 +39,30 @@
|
||||||
firewall.enable = false;
|
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";
|
time.timeZone = "America/Montreal";
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue