Skip to content

Commit

Permalink
ghostty: make package nullable on darwin platform
Browse files Browse the repository at this point in the history
  • Loading branch information
HeitorAugustoLN committed Jan 10, 2025
1 parent d4aebb9 commit 19e1615
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions modules/programs/ghostty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ in {
options.programs.ghostty = {
enable = lib.mkEnableOption "Ghostty";

package = lib.mkPackageOption pkgs "ghostty" { };
package = lib.mkPackageOption pkgs "Ghostty" {
default = [ "ghostty" ];
# TODO: Remove this after darwin is supported in ghostty package
nullable = pkgs.stdenv.hostPlatform.isDarwin;
};

settings = lib.mkOption {
inherit (keyValue) type;
Expand Down Expand Up @@ -108,7 +112,7 @@ in {

config = lib.mkIf cfg.enable (lib.mkMerge [
{
home.packages = [ cfg.package ];
home.packages = lib.optionals (cfg.package != null) [ cfg.package ];

programs.ghostty.settings = lib.mkIf cfg.clearDefaultKeybinds {
keybind = lib.mkBefore [ "clear" ];
Expand Down

0 comments on commit 19e1615

Please sign in to comment.