3 Commits

Author SHA1 Message Date
bdec3793d0 Make PIA connection check more tollerant to hiccups
All checks were successful
Check Flake / check-flake (push) Successful in 15m39s
2026-03-08 21:02:50 -07:00
dac2820c58 Bump ntfy attachment expiry time
All checks were successful
Check Flake / check-flake (push) Successful in 15m28s
2026-03-08 12:43:19 -07:00
a84ca38b45 Disable bolt for now since I don't use it and it sometimes randomly hangs 2026-03-08 12:42:32 -07:00
4 changed files with 15 additions and 7 deletions

View File

@@ -270,10 +270,17 @@ in
return 0 return 0
} }
MAX_RETRIES=4
for attempt in $(seq 1 $MAX_RETRIES); do
if check_vpn; then if check_vpn; then
rm -f "$COUNTER_FILE" rm -f "$COUNTER_FILE"
exit 0 exit 0
fi fi
if [ "$attempt" -lt "$MAX_RETRIES" ]; then
echo "Attempt $attempt/$MAX_RETRIES failed, retrying in 5 minutes..." >&2
sleep 300
fi
done
# Failed read and update counter (reset if from a previous day) # Failed read and update counter (reset if from a previous day)
today=$(date +%Y-%m-%d) today=$(date +%Y-%m-%d)
@@ -302,7 +309,7 @@ in
description = "Periodic PIA VPN connectivity check"; description = "Periodic PIA VPN connectivity check";
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
timerConfig = { timerConfig = {
OnCalendar = "*:0/5"; OnCalendar = "*:0/30";
RandomizedDelaySec = "30s"; RandomizedDelaySec = "30s";
}; };
}; };

View File

@@ -18,6 +18,7 @@ in
auth-default-access = "deny-all"; auth-default-access = "deny-all";
behind-proxy = true; behind-proxy = true;
enable-login = true; enable-login = true;
attachment-expiry-duration = "48h";
}; };
# backups # backups

View File

@@ -18,7 +18,7 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# thunderbolt # thunderbolt
services.hardware.bolt.enable = true; services.hardware.bolt.enable = false;
# firmware # firmware
firmware.x86_64.enable = true; firmware.x86_64.enable = true;

View File

@@ -22,7 +22,7 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
# thunderbolt # thunderbolt
services.hardware.bolt.enable = true; services.hardware.bolt.enable = false;
# firmware # firmware
firmware.x86_64.enable = true; firmware.x86_64.enable = true;