From 6208ef964114e11ee4a56cc6277f5d7c5c74f44b Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 11 Jun 2026 18:26:01 -0500 Subject: Add WireGuard VPN config and xmobar indicator on laptop --- modules/home/christian.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/home/christian.nix') diff --git a/modules/home/christian.nix b/modules/home/christian.nix index 64403dc..377e8ef 100644 --- a/modules/home/christian.nix +++ b/modules/home/christian.nix @@ -9,6 +9,7 @@ imports = [ ./nvim ]; options.custom.xmobarBattery = lib.mkEnableOption "xmobar battery widget"; + options.custom.xmobarVpn = lib.mkEnableOption "xmobar VPN indicator"; config = { home.stateVersion = "25.11"; @@ -128,10 +129,13 @@ "-l", "red", "-m", "#4eb4fa", "-h", "green"] 600 ''} + ${lib.optionalString config.custom.xmobarVpn '' + , Run Com "sh" ["-c", "ip link show wg0 2>/dev/null | grep -q 'UP' && echo 'vpn: on' || echo 'vpn: off'"] "vpn" 30 + ''} ] , sepChar = "%" , alignSep = "}{" - , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}%cpu% | %memory% | %wlan0% }{%date% " + , template = " %XMonadLog% | ${lib.optionalString config.custom.xmobarBattery "%battery% | "}${lib.optionalString config.custom.xmobarVpn "%vpn% | "}%cpu% | %memory% | %wlan0% }{%date% " } ''; }; -- cgit v1.2.3