feat(cheat): Install cheat

This commit is contained in:
punkfairie 2024-11-14 20:53:32 -08:00
parent d6b876860e
commit 92f360e2bb
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
2 changed files with 37 additions and 0 deletions

36
home/programs/cheat.nix Normal file
View file

@ -0,0 +1,36 @@
{ pkgs, config, ... }:
let
toYaml = (pkgs.formats.yaml { }).generate;
in
{
home.packages = with pkgs; [
cheat
];
xdg.configFile."cheat/conf.yml".source = toYaml "conf.yml" {
colorize = true;
# TODO set based on global color scheme
style = "rose-pine";
formatter = "terminal256";
pager = "less -FRX";
cheatpaths =
let
cheatDir = "${config.xdg.configHome}/cheat/cheatsheets";
in
[
{
name = "community";
path = "${cheatDir}/community";
tags = [ "community" ];
readonly = true;
}
{
name = "personal";
path = "${cheatDir}/personal";
tags = [ "personal" ];
readonly = false;
}
];
};
}

View file

@ -5,6 +5,7 @@
./bat.nix ./bat.nix
./btop.nix ./btop.nix
./cava.nix ./cava.nix
./cheat.nix
./curl.nix ./curl.nix
./eza.nix ./eza.nix
./figlet.nix ./figlet.nix