feat: adds pomodoro package for waybar

This commit is contained in:
Ahwx 2026-01-01 14:40:25 +01:00
parent dd39fb6fac
commit 319e9336db
2 changed files with 35 additions and 4 deletions

View file

@ -1,12 +1,11 @@
{
pkgs,
username,
config,
lib,
...
}:
let
# homeExternalIPv4 = "${pkgs.coreutils}/bin/cat ${config.sops.secrets.homeExternalIPv4.path}";
homeExternalIPv4 = "92.118.0.69";
waybar-module-pomodoro = pkgs.callPackage ./waybar-module-pomodoro.nix { };
in
{
home.file = {
@ -242,7 +241,7 @@ in
NODE="$(mullvad status | grep -Ei 'relay' | awk '{print $2}' | tr '[:upper:]' '[:lower:]')"
LOCATION="$(mullvad status | grep -Ei 'location' | cut -d':' -f2 | cut -d'.' -f1 | sed 's/ //g')"
IPV4="$(mullvad status | grep 'IPv4' | cut -d':' -f3 | sed 's/ //g')"
echo "$IPV4" | grep -q "${homeExternalIPv4}" && LOCATION="home"
echo "$IPV4" | grep -q "92.118.0.69" && LOCATION="home"
echo "$STATUS" | grep -Eioq 'connected|connecting' && TEXT="{\"text\":\"$STATUS ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}" # || ip address show tailscale0 | grep "global tailscale0" && TEXT="{\"text\":\"tailscale ($LOCATION)\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
echo "$STATUS" | grep -Eioq 'disconnected' && TEXT="{\"text\":\"$STATUS\",\"location\":\"$LOCATION\",\"node\":\"$NODE\"}"
@ -255,5 +254,6 @@ in
wf-recorder
bemenu
ncspot
waybar-module-pomodoro
];
}