Skip to content

Commit

Permalink
feat(home-manager/waybar): warn if prependImport has no effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichthagel committed Apr 23, 2024
1 parent 9d9fdb6 commit 441aec5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/home-manager/waybar.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ config
, options
, lib
, sources
, ...
Expand All @@ -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}";
Expand Down

0 comments on commit 441aec5

Please sign in to comment.