nixos/openvpn: tidy systemd restart-after-sleep unit

On reviewing my PR #345993, I spotted I'd failed to remove a
now-unneeded package and failed to update the systemd unit description,
so tidy that up.
This commit is contained in:
Adam Dinwoodie
2025-10-19 16:16:48 +01:00
parent 5b9e7534b7
commit 0794eb223b
@@ -85,13 +85,12 @@ let
restartService = optionalAttrs cfg.restartAfterSleep {
openvpn-restart = {
wantedBy = [ "sleep.target" ];
path = [ pkgs.procps ];
script =
let
unitNames = map (n: "openvpn-${n}.service") (builtins.attrNames cfg.servers);
in
"systemctl try-restart ${lib.escapeShellArgs unitNames}";
description = "Sends a signal to OpenVPN process to trigger a restart after return from sleep";
description = "Restart system OpenVPN connections when returning from sleep";
};
};