From 755846e9aa5ed41e3eb64ba66186aa6eaec3bd90 Mon Sep 17 00:00:00 2001 From: John Lancaster <32917998+jsl12@users.noreply.github.com> Date: Fri, 27 Mar 2026 18:40:15 -0500 Subject: [PATCH] disconnect cleanup --- modules/programs/wireguard.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/programs/wireguard.nix b/modules/programs/wireguard.nix index c053211..2410a03 100644 --- a/modules/programs/wireguard.nix +++ b/modules/programs/wireguard.nix @@ -21,9 +21,10 @@ service = "${serviceName}.service"; in pkgs.writeShellScriptBin "wg-disconnect-${interface}" '' + STOPTIME=$(${lib.getExe' pkgs.coreutils "date"} '+%Y-%m-%d %H:%M:%S') ${systemctl} stop ${service} start_time=$(${systemctl} show -p ActiveEnterTimestamp ${serviceName} | cut -d= -f2) - ${journalctl} -u ${service} --since "$start_time" --no-pager + ${journalctl} -u ${service} --since "$STOPTIME" --no-pager ''; in {