mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-13 16:12:40 +02:00
fix: wezterm on darwin
This commit is contained in:
@@ -1,7 +1,4 @@
|
|||||||
{
|
{pkgs, ...}:
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
###########################################################
|
###########################################################
|
||||||
#
|
#
|
||||||
# Wezterm Configuration
|
# Wezterm Configuration
|
||||||
@@ -13,17 +10,15 @@
|
|||||||
# wezterm has catppuccin theme built-in,
|
# wezterm has catppuccin theme built-in,
|
||||||
# it's not necessary to install it separately.
|
# it's not necessary to install it separately.
|
||||||
|
|
||||||
programs.wezterm = {
|
programs.wezterm =
|
||||||
|
{
|
||||||
enable = true;
|
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 =
|
extraConfig = let
|
||||||
let
|
fontsize =
|
||||||
fontsize = if pkgs.stdenv.isDarwin then "14.0" else "13.0";
|
if pkgs.stdenv.isDarwin
|
||||||
|
then "14.0"
|
||||||
|
else "13.0";
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
-- Pull in the wezterm API
|
-- Pull in the wezterm API
|
||||||
@@ -74,11 +69,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
config.font_size = ${fontsize}
|
config.font_size = ${fontsize}
|
||||||
'' + (if pkgs.stdenv.isDarwin then ''
|
''
|
||||||
|
+ (
|
||||||
|
if pkgs.stdenv.isDarwin
|
||||||
|
then ''
|
||||||
-- Spawn a fish shell in login mod
|
-- Spawn a fish shell in login mod
|
||||||
config.default_prog = { '/run/current-system/sw/bin/nu', '-l' }
|
config.default_prog = { '/run/current-system/sw/bin/nu', '-l' }
|
||||||
'' else "") + ''
|
''
|
||||||
|
else ""
|
||||||
|
)
|
||||||
|
+ ''
|
||||||
return config
|
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 {}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user