Skip to content

Commit

Permalink
feat(home-manager): add support for ghostty
Browse files Browse the repository at this point in the history
  • Loading branch information
natecox committed Jan 5, 2025
1 parent 8eada39 commit cb21371
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/home-manager/all-modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
./fzf.nix
./gh-dash.nix
./gitui.nix
./ghostty.nix
./glamour.nix
./gtk.nix
./helix.nix
Expand Down
25 changes: 25 additions & 0 deletions modules/home-manager/ghostty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ catppuccinLib }:
{ config, lib, ... }:

let
inherit (config.catppuccin) sources;

cfg = config.catppuccin.ghostty;
themeName = "catppuccin-${cfg.flavor}";
enable = cfg.enable && config.programs.ghostty.enable;
in
{
options.catppuccin.ghostty = catppuccinLib.mkCatppuccinOption { name = "ghostty"; };

config = lib.mkIf enable {
xdg.configFile = {
"ghostty/themes/${themeName}".source = "${sources.ghostty}/${themeName}.conf";
};

programs.ghostty = {
settings = {
theme = "light:${themeName},dark:${themeName}";
};
};
};
}
1 change: 1 addition & 0 deletions modules/tests/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
fuzzel.enable = true;
fzf.enable = true;
gh-dash.enable = true;
ghostty.enable = true;
git = {
enable = true;
delta.enable = true;
Expand Down
4 changes: 4 additions & 0 deletions pkgs/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"hash": "sha256-fOCZxrEyWLi+VYnx3QYOP1R+VBhllhOlnO5/5Wg5aq4=",
"rev": "acb1b1c22446e34781731ddbfb5e9bd699eccc74"
},
"ghostty": {
"hash": "sha256-YHHOGeXNlVdUdUXHQW4G+6Nl8xyHo2tuJ9b+/1LfGos=",
"rev": "1cb0c33770a411160cbe14b48b831455a2244ee3"
},
"gitui": {
"hash": "sha256-CRxpEDShQcCEYtSXwLV5zFB8u0HVcudNcMruPyrnSEk=",
"rev": "c7661f043cb6773a1fc96c336738c6399de3e617"
Expand Down

0 comments on commit cb21371

Please sign in to comment.