diff --git a/flake.lock b/flake.lock index 12ca0658..9d34bf47 100644 --- a/flake.lock +++ b/flake.lock @@ -55,6 +55,21 @@ "type": "github" } }, + "ghostty-module": { + "locked": { + "lastModified": 1702368251, + "narHash": "sha256-hafrDmzGplzm+vdIo+LkOjRfA4qRcy5JmpGGksnht5c=", + "owner": "clo4", + "repo": "ghostty-hm-module", + "rev": "887e13a6e7acf5ffaab0119d96e476d84db90904", + "type": "github" + }, + "original": { + "owner": "clo4", + "repo": "ghostty-hm-module", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -149,6 +164,7 @@ "inputs": { "darwin": "darwin", "flake-compat": "flake-compat", + "ghostty-module": "ghostty-module", "home-manager": "home-manager", "neovim-flake": "neovim-flake", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 1b899bf3..5fcd7eb9 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; }; diff --git a/home/modules/app/default.nix b/home/modules/app/default.nix index afe4c33a..6a4c9e1f 100644 --- a/home/modules/app/default.nix +++ b/home/modules/app/default.nix @@ -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 ]; } diff --git a/home/modules/app/ghostty/default.nix b/home/modules/app/ghostty/default.nix new file mode 100644 index 00000000..f7941dad --- /dev/null +++ b/home/modules/app/ghostty/default.nix @@ -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; + }; + }; + }; +} diff --git a/home/modules/app/ghostty/everfox.ghostty b/home/modules/app/ghostty/everfox.ghostty new file mode 100644 index 00000000..726ba99f --- /dev/null +++ b/home/modules/app/ghostty/everfox.ghostty @@ -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 diff --git a/system/nixos/hosts/wrath/home.nix b/system/nixos/hosts/wrath/home.nix index bd083f01..9e59299f 100644 --- a/system/nixos/hosts/wrath/home.nix +++ b/system/nixos/hosts/wrath/home.nix @@ -11,6 +11,7 @@ modules = { app = { alacritty.fontSize = 8; + ghostty.enable = true; wezterm.fontSize = 12; obs.enable = true; };