Skip to content

Commit

Permalink
feat: Update wezterm configuration into Nix
Browse files Browse the repository at this point in the history
  • Loading branch information
sudosubin committed Jan 3, 2025
1 parent 58ba82c commit 20b2f2f
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions modules/shared/programs/wezterm/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ config, lib, pkgs, ... }:
with lib;

let
inherit (pkgs.stdenvNoCC.hostPlatform) isDarwin;
inherit (pkgs.stdenvNoCC.hostPlatform) isDarwin isLinux;

colors = {
black = "#5c6370";
Expand All @@ -15,24 +16,32 @@ let
background = "#1e2127";
};

font =
if isLinux then [
{ family = "PragmataProMono Nerd Font Mono"; }
] else [
{ family = "PragmataProMono Nerd Font Mono"; }
{ family = "Apple Color Emoji"; assume_emoji_presentation = true; }
];
font-size = if isDarwin then 13 else 10;
font-family = "PragmataProMono Nerd Font Mono";

in
{
programs.wezterm = {
enable = true;

extraConfig = ''
return {
automatically_reload_config = true,
color_scheme = 'default',
font = wezterm.font('${font-family}'),
font_size = ${builtins.toString(font-size)},
front_end = 'WebGpu',
hide_tab_bar_if_only_one_tab = true,
window_decorations = 'RESIZE',
}
return ${generators.toLua { } {
automatically_reload_config = true;
color_scheme = "default";
font = generators.mkLuaInline ''
wezterm.font_with_fallback(${generators.toLua {} font})
'';
font_size = font-size;
front_end = "WebGpu";
hide_tab_bar_if_only_one_tab = true;
window_decorations = "RESIZE";
}};
'';

colorSchemes = {
Expand Down

0 comments on commit 20b2f2f

Please sign in to comment.