From c2646f9f2b800f318fef5227d629983b891c7520 Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Wed, 5 Dec 2018 11:54:52 +0100 Subject: [PATCH] polybar: switch from attrs to attrsOf (cherry picked from commit d67835260dbdbc0fc3fc735871ec26a2421ac1b2) --- 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 e94f7f22..82ae27b1 100644 --- a/modules/services/polybar.nix +++ b/modules/services/polybar.nix @@ -6,6 +6,8 @@ let cfg = config.services.polybar; + eitherStrBoolIntList = with types; either str (either bool (either int (listOf str))); + toPolybarIni = generators.toINI { mkKeyValue = key: value: let @@ -57,7 +59,7 @@ in type = types.coercedTo types.path (p: { "section/base" = { include-file = "${p}"; }; }) - (types.attrsOf types.attrs); + (types.attrsOf (types.attrsOf eitherStrBoolIntList)); description = '' Polybar configuration. Can be either path to a file, or set of attributes that will be used to create the final configuration.