diff --git a/modules/darwin/programs/wezterm.nix b/modules/darwin/programs/wezterm.nix index 1c5c23a..ac588b7 100644 --- a/modules/darwin/programs/wezterm.nix +++ b/modules/darwin/programs/wezterm.nix @@ -1,6 +1,6 @@ { - lib, config, + lib, ... }: let cfg = config.marleyos.programs.wezterm; diff --git a/modules/home/profiles.nix b/modules/home/profiles.nix index 327b12d..c8b8c5b 100644 --- a/modules/home/profiles.nix +++ b/modules/home/profiles.nix @@ -66,6 +66,7 @@ in { tea = enabled; thunderbird = enabled; vlc = enabled; + wezterm = enabled; }; services = { diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 2d108c8..2293302 100644 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -47,6 +47,7 @@ ./tmux.nix ./vlc.nix ./waybar.nix + ./wezterm.nix ./wget.nix ./zoxide.nix diff --git a/modules/home/programs/wezterm.nix b/modules/home/programs/wezterm.nix new file mode 100644 index 0000000..745dce9 --- /dev/null +++ b/modules/home/programs/wezterm.nix @@ -0,0 +1,39 @@ +{ + marleylib, + config, + osConfig, + lib, + pkgs, + ... +}: let + inherit (marleylib.module) mkEnableOption'; + + cfg = config.marleyos.programs.wezterm; + osCfg = osConfig.marleyos.programs.wezterm.enable or false; +in { + options.marleyos.programs.wezterm.enable = mkEnableOption' "wezterm" osCfg; + + config = lib.mkIf cfg.enable { + programs.wezterm = { + enable = true; + package = lib.mkIf pkgs.stdenv.isDarwin pkgs.emptyDirectory; + + # TODO: create `local config` & return it separately, so other modules can + # insert config in the middle. + extraConfig = + # lua + '' + local config = wezterm.config_builder() + + -- Fix color blocks instead of text issue. + config.front_end = "WebGpu" + + config.freetype_load_flags = 'NO_HINTING' + + config.enable_tab_bar = false + + return config + ''; + }; + }; +} diff --git a/snowflake/modules/home/programs/gui/wezterm/default.nix b/snowflake/modules/home/programs/gui/wezterm/default.nix deleted file mode 100644 index 9f675ce..0000000 --- a/snowflake/modules/home/programs/gui/wezterm/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - lib, - config, - system, - pkgs, - ... -}: let - inherit (lib.snowfall.system) is-darwin; - - cfg = config.marleyos.programs.wezterm; - - isGenericLinux = config.targets.genericLinux.enable; - isNotNixOS = isGenericLinux || (is-darwin system); -in { - options.marleyos.programs.wezterm.enable = lib.mkEnableOption "wezterm"; - - config = lib.mkIf cfg.enable { - programs.wezterm = { - enable = true; - - # Generic linux: NixGL makes Wezterm shit the bed for some reason. - # macOS: Prefer brew cask so a proper Applications shortcut is made. - package = - if isNotNixOS - then pkgs.emptyDirectory - else pkgs.wezterm; - - # TODO: create `local config` & return it seperately, so other modules can - # insert config in the middle - extraConfig = - # lua - '' - local config = wezterm.config_builder() - - -- Fix color blocks instead of text issue. - config.front_end = "WebGpu" - - config.freetype_load_flags = 'NO_HINTING' - - config.enable_tab_bar = false - - return config - ''; - }; - }; -}