feat: wezterm
This commit is contained in:
parent
d244b5d2a5
commit
979d3dba03
5 changed files with 42 additions and 47 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.wezterm;
|
cfg = config.marleyos.programs.wezterm;
|
||||||
|
|
|
@ -66,6 +66,7 @@ in {
|
||||||
tea = enabled;
|
tea = enabled;
|
||||||
thunderbird = enabled;
|
thunderbird = enabled;
|
||||||
vlc = enabled;
|
vlc = enabled;
|
||||||
|
wezterm = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./vlc.nix
|
./vlc.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
|
./wezterm.nix
|
||||||
./wget.nix
|
./wget.nix
|
||||||
./zoxide.nix
|
./zoxide.nix
|
||||||
|
|
||||||
|
|
39
modules/home/programs/wezterm.nix
Normal file
39
modules/home/programs/wezterm.nix
Normal 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue