fix: wezterm on darwin

This commit is contained in:
Ryan Yin
2023-11-30 11:01:53 +08:00
parent b977203d15
commit d9be6f9213

View File

@@ -1,7 +1,4 @@
{
pkgs,
...
}:
{pkgs, ...}:
###########################################################
#
# Wezterm Configuration
@@ -13,17 +10,15 @@
# wezterm has catppuccin theme built-in,
# it's not necessary to install it separately.
programs.wezterm = {
programs.wezterm =
{
enable = true;
package = if pkgs.stdenv.isDarwin
then
pkgs.hello # install wezterm via homebrew on macOS to avoid compilation, dummy package here.
else
pkgs.wezterm;
extraConfig =
let
fontsize = if pkgs.stdenv.isDarwin then "14.0" else "13.0";
extraConfig = let
fontsize =
if pkgs.stdenv.isDarwin
then "14.0"
else "13.0";
in
''
-- Pull in the wezterm API
@@ -74,11 +69,27 @@
}
config.font_size = ${fontsize}
'' + (if pkgs.stdenv.isDarwin then ''
''
+ (
if pkgs.stdenv.isDarwin
then ''
-- Spawn a fish shell in login mod
config.default_prog = { '/run/current-system/sw/bin/nu', '-l' }
'' else "") + ''
''
else ""
)
+ ''
return config
'';
};
}
// (
if pkgs.stdenv.isDarwin
then {
# install wezterm via homebrew on macOS to avoid compilation, dummy package here.
package = pkgs.hello;
enableBashIntegration = false;
enableZshIntegration = false;
}
else {}
);
}