feat(modules/home-manager): add glamour (#44)

This commit is contained in:
Ryan Cao 2023-10-23 00:48:48 +08:00 committed by GitHub
parent 4ade204012
commit a97085d28b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 0 deletions

View file

@ -19,6 +19,7 @@ in
./lazygit.nix
./starship.nix
./helix.nix
./glamour.nix
./gtk.nix
./neovim.nix
./polybar.nix

View file

@ -0,0 +1,31 @@
{ config
, pkgs
, lib
,
}:
let
cfg = config.programs.glamour.catppuccin;
enable = cfg.enable;
version = "1.0.0";
hashes = {
latte = "sha256-V0LsRStF1vL+Tz8G6VaKiwiY/ZIsSkMc+f1WJAITYXU=";
frappe = "sha256-YOatgYCJKuesVERHZVmF1xtzuLjyxCYstoWYqATq+NU=";
macchiato = "sha256-CeSJvhjzHVTtlqgQLKOrdLXtp2OQlMh24IaA1QQiQCk=";
mocha = "sha256-Tx2fQteL4wxhV+qHYZibakiYoEhS4HjyMO0yBcU/F6Q=";
};
in
{
options.programs.glamour.catppuccin =
lib.ctp.mkCatppuccinOpt "glamour" config;
config = {
home.sessionVariables = lib.mkIf enable {
GLAMOUR_STYLE = pkgs.fetchurl {
url = "https://github.com/catppuccin/glamour/releases/download/v${version}/${cfg.flavour}.json";
hash = hashes.${cfg.flavour};
};
};
};
}