Skip to content

Commit

Permalink
polybar: use recursive config type
Browse files Browse the repository at this point in the history
Allow merging of lists and attrsets
  • Loading branch information
arcnmx committed Nov 13, 2021
1 parent 7f976da commit c48f635
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 c48f635

Please sign in to comment.