mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-26 01:48:27 +02:00
fix: wezterm on darwin
This commit is contained in:
@@ -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 {}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user