diff --git a/home-manager/sway/waybar.nix b/home-manager/sway/waybar.nix index 58e305e..44a633f 100644 --- a/home-manager/sway/waybar.nix +++ b/home-manager/sway/waybar.nix @@ -202,12 +202,26 @@ on-click = "makotoggle"; }; weatherModule = { - exec = pkgs.writeScript "weatherScript" '' + exec = let + weatherConf = pkgs.writeText "weather.jsonc" '' + { + "logo": { + "source": "none" + }, + "modules": [ + { + "type": "weather", + "outputFormat": "%0A%t%0A%C%0A%l" + } + ] + } + ''; + in pkgs.writeScript "weatherScript" '' # Fetch weather data - fetch=$(fastfetch -c all -s weather -l none | sed -E 's/Weather: ([^ ]+) - ([^ ]+ [^ ]+) (\(.*\))/\1\n\2\n\3/' | sed 's/^\+//') - temp=$(echo "$fetch" | sed -n '1p') - condition=$(echo "$fetch" | sed -n '2p') - location=$(echo "$fetch" | sed -n '3p' | sed 's/[()]//g') + fetch=$(fastfetch -c ${weatherConf}) + temp=$(echo "$fetch" | sed -n '2s/^\+//p') + condition=$(echo "$fetch" | sed -n '3p') + location=$(echo "$fetch" | sed -n '4p') # Map weather conditions to emojis case "$condition" in diff --git a/nixos/server/wireguard.nix b/nixos/server/wireguard.nix index 2b617f5..9155f51 100644 --- a/nixos/server/wireguard.nix +++ b/nixos/server/wireguard.nix @@ -16,7 +16,7 @@ in { interfaces = { # Wireguard interface name can be arbitrary wg0 = { - # Determines the IP address and subnet of the server's end of the tunnel interface. + # Determines the IP and subnet of the tunnel interface ips = [ "${ips.wgSpan}.1/24" ]; listenPort = 51820; privateKey = outputs.secrets.wireguardPriv;