rose-pine-nix/modules/home-manager/bottom.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

23 lines
587 B
Nix

{ config
, pkgs
, lib
, ...
}:
let
inherit (builtins) fromTOML readFile;
cfg = config.programs.bottom.catppuccin;
enable = cfg.enable && config.programs.bottom.enable;
in
{
options.programs.bottom.catppuccin =
lib.ctp.mkCatppuccinOpt "bottom" config;
config.programs.bottom.settings = lib.mkIf enable (fromTOML (readFile (pkgs.fetchFromGitHub
{
owner = "catppuccin";
repo = "bottom";
rev = "c0efe9025f62f618a407999d89b04a231ba99c92";
sha256 = "sha256-VaHX2I/Gn82wJWzybpWNqU3dPi3206xItOlt0iF6VVQ=";
}
+ "/themes/${cfg.flavour}.toml")));
}