rose-pine-nix/modules/home-manager/polybar.nix
seth 60a1d9ba22
refactor: use alternatives to with and rec (#38)
* fix(home-manager): dont declare xdg.configFile when btop isn't enabled

* refactor: use alternatives to `with` and `rec`

---------

Co-authored-by: Sam Nystrom <sam@samnystrom.dev>
2023-07-13 12:17:51 -04:00

22 lines
553 B
Nix

{ config
, pkgs
, lib
, ...
}:
let
cfg = config.services.polybar.catppuccin;
enable = cfg.enable && config.services.polybar.enable;
in
{
options.services.polybar.catppuccin =
lib.ctp.mkCatppuccinOpt "polybar" config;
config.services.polybar.extraConfig = lib.mkIf enable (builtins.readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "polybar";
rev = "9ee66f83335404186ce979bac32fcf3cd047396a";
sha256 = "sha256-bUbSgMg/sa2faeEUZo80GNmhOX3wn2jLzfA9neF8ERA=";
}
+ "/themes/${cfg.flavour}.ini"));
}