2024-06-12 18:09:56 +07:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
2024-07-10 14:49:12 +07:00
|
|
|
cfg = config.profile.programs.wezterm;
|
2024-06-12 18:09:56 +07:00
|
|
|
in
|
2024-06-12 09:54:11 +07:00
|
|
|
{
|
2024-06-12 18:09:56 +07:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
programs.wezterm = {
|
|
|
|
enable = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
enableBashIntegration = true;
|
2024-07-10 15:13:57 +07:00
|
|
|
|
|
|
|
extraConfig = /*lua*/ ''
|
|
|
|
-- take config from ./base_config.lua
|
|
|
|
local config = require('base_config')
|
|
|
|
|
|
|
|
-- and override settings for nixos specific things here.
|
|
|
|
config.window_background_opacity = ${toString cfg.config.window_background_opacity};
|
|
|
|
|
|
|
|
return config
|
|
|
|
'';
|
2024-06-12 18:09:56 +07:00
|
|
|
};
|
2024-06-12 09:54:11 +07:00
|
|
|
|
2024-08-14 13:50:08 +07:00
|
|
|
programs.zsh.initExtra = /*bash*/ ''
|
|
|
|
if [ -n "$WEZTERM_PANE" ]; then
|
|
|
|
alias ssh="wezterm ssh"
|
|
|
|
fi
|
|
|
|
'';
|
2024-07-10 15:13:57 +07:00
|
|
|
|
2024-06-12 18:09:56 +07:00
|
|
|
home.file.".config/wezterm" = {
|
|
|
|
source = ./.;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2024-06-12 09:54:11 +07:00
|
|
|
};
|
|
|
|
}
|