user/eww: use boolToString

This commit is contained in:
LavaDesu 2025-03-23 12:44:10 +11:00
parent d9269fbb93
commit d92455cebf
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

@ -1,5 +1,6 @@
{ config, pkgs, ... }:
{ config, lib, pkgs, ... }:
let
inherit (lib) boolToString;
res = pkgs.stdenvNoCC.mkDerivation {
pname = "eww-wayland-config";
version = "1.0.0";
@ -8,10 +9,10 @@ let
cp -r ${../../res/eww} $out
substituteInPlace $out/eww.yuck \
--replace-fail "_BAT_ENABLED_" "${config.me.batteryDevice != null}" \
--replace-fail "_BAT_ENABLED_" "${boolToString (config.me.batteryDevice != null)}" \
--replace-fail "_BAT_PATH_" "${config.me.batteryDevice}" \
--replace-fail "_BT_ENABLED_" "${config.me.hasBluetooth}" \
--replace-fail "_WIFI_ENABLED_" "${config.me.hasWifi}"
--replace-fail "_BT_ENABLED_" "${boolToString config.me.hasBluetooth}" \
--replace-fail "_WIFI_ENABLED_" "${boolToString config.me.hasWifi}"
substituteInPlace $out/eww.scss \
--replace-fail "EWW_BACKGROUND" "${config.catppuccin.hexcolors.crust}" \