Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(home-manager): add support for ghostty #446

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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;
getchoo marked this conversation as resolved.
Show resolved Hide resolved
getchoo marked this conversation as resolved.
Show resolved Hide resolved
themeName = "catppuccin-${cfg.flavor}";
enable = cfg.enable && config.programs.ghostty.enable;
natecox marked this conversation as resolved.
Show resolved Hide resolved
in
{
options.catppuccin.ghostty = catppuccinLib.mkCatppuccinOption { name = "ghostty"; };

config = lib.mkIf enable {
natecox marked this conversation as resolved.
Show resolved Hide resolved
xdg.configFile = {
"ghostty/themes/${themeName}".source = "${sources.ghostty}/${themeName}.conf";
};

programs.ghostty = {
settings = {
theme = "light:${themeName},dark:${themeName}";
};
};
getchoo marked this conversation as resolved.
Show resolved Hide resolved
getchoo marked this conversation as resolved.
Show resolved Hide resolved
};
}
1 change: 1 addition & 0 deletions modules/tests/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
chromium.enable = lib.mkVMOverride false;
foot.enable = lib.mkVMOverride false;
fuzzel.enable = lib.mkVMOverride false;
ghostty.enable = lib.mkVMOverride false; # TODO: Remove when Darwin support is added
hyprlock.enable = lib.mkVMOverride false;
imv.enable = lib.mkVMOverride false;
mpv.enable = lib.mkVMOverride false; # NOTE: same as cava, but `mpv` fails to build currently
Expand Down
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
Loading