File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 22 # keep-sorted start
33 ./aerc.nix
44 ./alacritty.nix
5+ ./anki.nix
56 ./atuin.nix
67 ./bat.nix
78 ./bottom.nix
Original file line number Diff line number Diff line change 1+ { catppuccinLib } :
2+ {
3+ config ,
4+ pkgs ,
5+ lib ,
6+ ...
7+ } :
8+
9+ let
10+ cfg = config . catppuccin . anki ;
11+ in
12+
13+ {
14+ options . catppuccin . anki = catppuccinLib . mkCatppuccinOption { name = "anki" ; } ;
15+
16+ config = lib . mkIf cfg . enable {
17+ programs . anki = {
18+ addons = with pkgs . ankiAddons ; [
19+ ( recolor . withConfig {
20+ config =
21+ let
22+ polarity = if config . catppuccin . flavor == "latte" then "light" else "dark" ;
23+ flavor = lib . toSentenceCase config . catppuccin . flavor ;
24+ version = builtins . splitVersion recolor . version ;
25+ in
26+ ( lib . importJSON "${ recolor } /share/anki/addons/recolor/themes/(${ polarity } ) Catppuccin ${ flavor } .json" )
27+ // {
28+ version = {
29+ major = lib . toInt ( builtins . elemAt version 0 ) ;
30+ minor = lib . toInt ( builtins . elemAt version 1 ) ;
31+ } ;
32+ } ;
33+ } )
34+ ] ;
35+ } ;
36+ } ;
37+ }
Original file line number Diff line number Diff line change 2525 # keep-sorted start block=yes sticky_comments=yes
2626 aerc . enable = true ;
2727 alacritty . enable = true ;
28+ anki . enable = true ;
2829 bat . enable = true ;
2930 bottom . enable = true ;
3031 brave . enable = true ;
You can’t perform that action at this time.
0 commit comments