From 9b0c0dd0fe557ad47bfe7fad9c82d4a607ce4963 Mon Sep 17 00:00:00 2001 From: postsolar <120750161+postsolar@users.noreply.github.com> Date: Sat, 14 Jun 2025 04:29:47 +0300 Subject: [PATCH] fix: default HM module `config` option to `null` This makes it more semantically approachable IMO. I would expect this behavior: - Default value is `null` - Config is created if the value is not `null` Currently it's this behavior (makes little sense to me): - Default value is `{}` - Config is created if the values is not `""` --- nix/module.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/module.nix b/nix/module.nix index a6753b7..9cbbcda 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -36,7 +36,7 @@ in { config = mkOption { type = jsonFormat.type; - default = {}; + default = null; description = "The config to pass to ironbar."; }; @@ -53,7 +53,7 @@ in { ]; xdg.configFile = { - "ironbar/config.json" = mkIf (cfg.config != "") { + "ironbar/config.json" = mkIf (cfg.config != null) { onChange = "${getExe cfg.package} reload"; source = jsonFormat.generate "ironbar-config" cfg.config; };