Skip to content

Commit

Permalink
feat(nix): add ghostty home manager module
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Jan 27, 2024
1 parent 0fe4a47 commit 587c047
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 1 deletion.
16 changes: 16 additions & 0 deletions flake.lock

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

3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
nushell-src.url = "github:nushell/nushell";
nushell-src.flake = false;

ghostty-module.url = "github:clo4/ghostty-hm-module";
ghostty-module.inputs.nixpkgs.follows = "nixpkgs";

# eww.url = "github:elkowar/eww";
};

Expand Down
2 changes: 1 addition & 1 deletion home/modules/app/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ ... }:

{
imports = [ ./alacritty.nix ./discord.nix ./firefox.nix ./kitty.nix ./obs.nix ./wezterm.nix ];
imports = [ ./ghostty ./alacritty.nix ./discord.nix ./firefox.nix ./kitty.nix ./obs.nix ./wezterm.nix ];
}
42 changes: 42 additions & 0 deletions home/modules/app/ghostty/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{ inputs, config, lib, pkgs, ... }:

with lib;
let
cfg = config.nyx.modules.app.ghostty;
in
{
imports = [ inputs.ghostty-module.homeModules.default ];

options.nyx.modules.app.ghostty = {
enable = mkEnableOption "ghostty configuration";
# package = mkOption {
# description = "Package for alacritty";
# type = with types; nullOr package;
# default = pkgs.alacritty;
# };

fontSize = mkOption {
description = "Override font size";
type = types.int;
default = 12;
};
};

config = mkIf cfg.enable {
programs.ghostty = {
enable = true;
settings = {
config-file = [ (toString (./. + "/everfox.ghostty")) ];

title = "Ghostty 👻";

cursor-style-blink = false;
mouse-hide-while-typing = true;

font-size = cfg.fontSize;

quit-after-last-window-closed = true;
};
};
};
}
28 changes: 28 additions & 0 deletions home/modules/app/ghostty/everfox.ghostty
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
background = #2d353b
foreground = #d3c6aa
selection-background = #4f4954
selection-foreground = #d3c6aa
cursor-color = #dfdfdf

# normal
palette = 0=#393b44
palette = 1=#e67e80
palette = 2=#a7c080
palette = 3=#dbbc7f
palette = 4=#7fbbb3
palette = 5=#d699b6
palette = 6=#83c092
palette = 7=#dfdfdf

# bright
palette = 8=#505360
palette = 9=#eea9aa
palette = 10=#bfd1a2
palette = 11=#e6d1a7
palette = 12=#a0cdc7
palette = 13=#e5bdd0
palette = 14=#a5d1b0
palette = 15=#f9f9f9

# extended colors
palette = 16=#e69875
1 change: 1 addition & 0 deletions system/nixos/hosts/wrath/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
modules = {
app = {
alacritty.fontSize = 8;
ghostty.enable = true;
wezterm.fontSize = 12;
obs.enable = true;
};
Expand Down

0 comments on commit 587c047

Please sign in to comment.