From a7c5b00d44f65efd1e8ace2c02243f179e72283a Mon Sep 17 00:00:00 2001 From: arcnmx Date: Mon, 15 Nov 2021 13:00:45 -0800 Subject: [PATCH] polybar: use recursive config type (#2235) Allow merging of lists and attrsets --- modules/services/polybar.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/services/polybar.nix b/modules/services/polybar.nix index 8d341252fe21..7912d8988ffd 100644 --- a/modules/services/polybar.nix +++ b/modules/services/polybar.nix @@ -112,7 +112,9 @@ in { }; settings = mkOption { - type = types.attrsOf types.attrs; + type = with types; + let ty = oneOf [ bool int float str (listOf ty) (attrsOf ty) ]; + in attrsOf (attrsOf ty // { description = "attribute sets"; }); description = '' Polybar configuration. This takes a nix attrset and converts it to the strange data format that polybar uses.