Skip to content

Commit

Permalink
polybar: use recursive config type (#2235)
Browse files Browse the repository at this point in the history
Allow merging of lists and attrsets
  • Loading branch information
arcnmx authored Nov 15, 2021
1 parent 2dcd9eb commit a7c5b00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/services/polybar.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit a7c5b00

Please sign in to comment.