aboutsummaryrefslogtreecommitdiff
path: root/modules/wezterm.nix
blob: f2f8be4bbef92d875ac92f35ac6b00b7999ac3ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ config, lib, pkgs, ... }:

let
  cfg = config.wezterm;
in {
  options.wezterm.enable = lib.mkEnableOption "Enable wezterm and setup";
  config = lib.mkIf cfg.enable {
    home.packages = with pkgs; [
      (nerdfonts.override { fonts = [ "SpaceMono" "IBMPlexMono" "Terminus" ]; })
    ];

    programs.wezterm = {
      enable = true;
      enableZshIntegration = true;
      extraConfig = ''
      local wezterm = require 'wezterm'

      local config = wezterm.config_builder()

      config.font = wezterm.font "SpaceMono Nerd Font Mono"
      config.font_size = 10
      config.use_fancy_tab_bar = true
      config.hide_tab_bar_if_only_one_tab = true
      config.window_background_opacity = 0.9
      config.exit_behavior = 'Close'
      config.exit_behavior_messaging = 'None'

      return config
    '';
    };
  };
}