aboutsummaryrefslogtreecommitdiff
path: root/modules/wezterm.nix
blob: 66da93b496cca708f402f3a3a1d4d4522257c3ba (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
{ config, lib, pkgs, ... }:

let
  cfg = config.wezterm;
in {
  options.wezterm.enable = lib.mkEnableOption "Enable wezterm and setup";
  config = lib.mkIf cfg.enable {
    programs.wezterm = {
      enable = true;
      enableZshIntegration = true;
      extraConfig = ''
      local wezterm = require 'wezterm'

      local config = wezterm.config_builder()

      config.use_fancy_tab_bar = true
      config.hide_tab_bar_if_only_one_tab = true
      config.window_background_opacity = 0.8
      config.exit_behavior = 'Hold'
      config.exit_behavior_messaging = 'None'

      return config
    '';
    };
  };
}