user/eww: fix null coercion

This commit is contained in:
LavaDesu 2025-03-23 13:29:25 +11:00
parent 29a5866f90
commit a5538535c2
Signed by: cilly
GPG key ID: 6500251E087653C9

View file

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