nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

commit 8f105d2e5feb000b3a3200a09affc3734ce4918f
parent 6920565ca5b7fa3680c001f5d7d2066d69692219
Author: breadcat <breadcat@users.noreply.github.com>
Date:   Tue, 14 Jul 2026 21:15:40 +0100

Only include battery if on a laptop

Diffstat:
Mhome/wayle.nix | 12+++++++++---
Mmachines/minerva.nix | 1+
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/home/wayle.nix b/home/wayle.nix @@ -1,5 +1,11 @@ -{ ... }: +{ lib, machine, ... }: +let + batteryMachines = [ "minerva" ]; + hasBattery = builtins.elem machine batteryMachines; + deskModules = [ "media" "cpu" "ram" "storage" "netstat" "volume" "weather" "notifications" "clock" "power" ]; + batModules = [ "cpu" "ram" "storage" "netstat" "battery" "volume" "weather" "notifications" "clock" "power" ]; +in { services.wayle = { enable = true; @@ -13,10 +19,10 @@ button-variant = "basic"; layout = [ { - center = [ "media" ]; left = [ "dashboard" "hyprland-workspaces" "window-title" ]; + center = [ ]; monitor = "*"; - right = [ "cpu" "ram" "storage" "netstat" "volume" "weather" "notifications" "clock" "power" ]; + right = if hasBattery then batModules else deskModules; show = true; } ]; diff --git a/machines/minerva.nix b/machines/minerva.nix @@ -51,6 +51,7 @@ let machine = "minerva"; in { ../home/spotify.nix ../home/ssh.nix ../home/tofi.nix + ../home/wayle.nix ../home/yt-dlp.nix ]; home.stateVersion = "24.11";