diff options
| author | Christian <[email protected]> | 2026-06-11 18:26:01 -0500 |
|---|---|---|
| committer | Christian <[email protected]> | 2026-06-11 18:26:01 -0500 |
| commit | 6208ef964114e11ee4a56cc6277f5d7c5c74f44b (patch) | |
| tree | 249f2502e7db5b75c0274c78b9045c9d0fd93a3b /modules | |
| parent | be276fb33d3dcd5cf6296cb1e8bcdf599f5f73ca (diff) | |
Add WireGuard VPN config and xmobar indicator on laptop
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/home/christian.nix | 6 |
1 files changed, 5 insertions, 1 deletions
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 '<fc=green>vpn: on</fc>' || echo '<fc=red>vpn: off</fc>'"] "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% " } ''; }; |
