diff options
Diffstat (limited to 'home-manager/theme-st.nix')
-rw-r--r-- | home-manager/theme-st.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/home-manager/theme-st.nix b/home-manager/theme-st.nix index aa4ddbb..110c9d6 100644 --- a/home-manager/theme-st.nix +++ b/home-manager/theme-st.nix @@ -1,9 +1,10 @@ { config, lib, pkgs, ... }: let cfg = config.programs._st; + toString = x: if lib.isBool x then (if x then "true" else "false") else builtins.toString x; generateXftFontString = name: attrs: - name + lib.optionalString lib.attrIsEmpty attrs ( - ":" + builtins.concatStringsSep ":" ( - lib.mapAttrsToList (key: value: "${key}=${value}") attrs + name + lib.optionalString (attrs != {}) ( + ":" + lib.concatStringsSep ":" ( + lib.mapAttrsToList (key: value: "${key}=${toString value}") attrs ) ) ; @@ -23,7 +24,7 @@ in { example = "JetBrainsMonoNL Nerd Font Mono"; default = "monospace"; }; - attrs = { + attrs = lib.mkOption { type = lib.types.attrs; default = {}; example = { |