feat: wezterm

This commit is contained in:
punkfairie 2025-05-31 17:49:03 -07:00
parent d244b5d2a5
commit 979d3dba03
Signed by: punkfairie
GPG key ID: B3C5488E9A1A7CA6
5 changed files with 42 additions and 47 deletions

View file

@ -1,6 +1,6 @@
{
lib,
config,
lib,
...
}: let
cfg = config.marleyos.programs.wezterm;

View file

@ -66,6 +66,7 @@ in {
tea = enabled;
thunderbird = enabled;
vlc = enabled;
wezterm = enabled;
};
services = {

View file

@ -47,6 +47,7 @@
./tmux.nix
./vlc.nix
./waybar.nix
./wezterm.nix
./wget.nix
./zoxide.nix

View file

@ -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
'';
};
};
}

View file

@ -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
'';
};
};
}