️ force wg-quick service to restart on-failure

This commit is contained in:
Laureηt 2023-04-25 20:53:03 +02:00
parent 3d9ceca69f
commit 102d5058b5
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -22,9 +22,20 @@
publicKey = "y36/EpLUerwM6NSGsVDCkb37Wj/Z3CI0mPFGatVa0Ws=";
allowedIPs = [ "10.0.0.1/24" ];
endpoint = "fainsin.bzh:5553";
persistentKeepalive = 30;
}];
};
};
systemd.services.wg-quick-wg0 = {
serviceConfig = {
Type = lib.mkForce "simple";
Restart = "on-failure";
RestartSec = "10s";
};
unitConfig = {
StartLimitIntervalSec = 0; # ensure Restart= is always honoured
};
};
# This should already be here from switching to bootspec earlier.
# It's not required anymore, but also doesn't do any harm.