From a5538535c215b7bffd025298f7776ad1e9b50018 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Sun, 23 Mar 2025 13:29:25 +1100 Subject: [PATCH] user/eww: fix null coercion --- modules/user/eww.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/user/eww.nix b/modules/user/eww.nix index 1a6ee54..9d839e0 100644 --- a/modules/user/eww.nix +++ b/modules/user/eww.nix @@ -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}"