{ config, pkgs, lib, hostname, ... }: let filterBacklight = list: builtins.filter (item: !(builtins.elem item.block ( if hostname == "dingbox" then ["backlight" "battery"] else [] ))) list; in { programs.i3status-rust = { enable = true; bars = { main = { theme = "dracula"; icons = "awesome"; blocks = [ { block = "time"; } ] ++ lib.optionals (hostname == "pingbox") [ { block = "battery"; allow_missing = true; hide_missing = true; } { block = "backlight"; device = "intel_backlight"; step_width = 10; invert_icons = true; } ] ++ [ { block = "networkmanager"; primary_only = true; ap_format = "{ssid}"; device_format = "{icon}{ap}"; } { block = "keyboard_layout"; } { block = "notify"; } { block = "music"; player = "spotifyd"; buttons = ["prev" "play" "next"]; } { block = "sound"; } ]; }; }; }; }