From 3db603677509eb0b8c396a3234b1d4b70d023894 Mon Sep 17 00:00:00 2001 From: Bruno Inec <7051978+sweenu@users.noreply.github.com> Date: Sun, 19 Dec 2021 06:21:15 +0100 Subject: [PATCH] waybar: allow using attrs for settings (#2547) Co-authored-by: Bruno Inec --- modules/programs/waybar.nix | 23 ++++-- tests/modules/programs/waybar/default.nix | 1 + .../waybar/settings-complex-expected.json | 16 ++++ .../programs/waybar/settings-complex.nix | 79 +++++++++++-------- .../programs/waybar/settings-with-attrs.nix | 29 +++++++ 5 files changed, 105 insertions(+), 43 deletions(-) create mode 100644 tests/modules/programs/waybar/settings-with-attrs.nix diff --git a/modules/programs/waybar.nix b/modules/programs/waybar.nix index e7963e827..1d76b5658 100644 --- a/modules/programs/waybar.nix +++ b/modules/programs/waybar.nix @@ -156,7 +156,7 @@ in { }; settings = mkOption { - type = listOf waybarBarConfig; + type = either (listOf waybarBarConfig) (attrsOf waybarBarConfig); default = [ ]; description = '' Configuration for Waybar, see