From 441aec5eef1e9cfe00aa2b278a87a2af2cc10c49 Mon Sep 17 00:00:00 2001 From: Lichthagel Date: Tue, 23 Apr 2024 23:40:55 +0200 Subject: [PATCH] feat(home-manager/waybar): warn if prependImport has no effect --- modules/home-manager/waybar.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/home-manager/waybar.nix b/modules/home-manager/waybar.nix index d6f4fcd9..9af6684f 100644 --- a/modules/home-manager/waybar.nix +++ b/modules/home-manager/waybar.nix @@ -1,4 +1,5 @@ { config +, options , lib , sources , ... @@ -24,6 +25,10 @@ in styleFile = "${sources.waybar}/themes/${cfg.flavour}.css"; in { + warnings = lib.optional (cfg.mode == "prependImport" && options.programs.waybar.style.highestPrio < lib.modules.defaultOverridePriority) [ + "`programs.waybar.style` is set to a string with a lower priority value than the default ${toString lib.modules.defaultOverridePriority}. `programs.waybar.catppucccin.mode = \"prependImport\"` will have no effect." + ]; + programs.waybar.style = lib.mkIf (cfg.mode == "prependImport") ( lib.mkBefore '' @import "${styleFile}";