mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nix): migrate WezTerm
This commit is contained in:
@@ -16,7 +16,6 @@
|
|||||||
~/.tmux-cht-command: tmux/tmux-cht-command
|
~/.tmux-cht-command: tmux/tmux-cht-command
|
||||||
~/.tmux-cht-languages: tmux/tmux-cht-languages
|
~/.tmux-cht-languages: tmux/tmux-cht-languages
|
||||||
~/.tmux.conf: tmux/tmux.conf
|
~/.tmux.conf: tmux/tmux.conf
|
||||||
~/.wezterm.lua: wezterm/wezterm.lua
|
|
||||||
~/.zsh.d: zsh/zsh.d
|
~/.zsh.d: zsh/zsh.d
|
||||||
~/.zshrc: zsh/zshrc
|
~/.zshrc: zsh/zshrc
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
casks = [
|
casks = [
|
||||||
"hammerspoon"
|
"hammerspoon"
|
||||||
"raycast"
|
"raycast"
|
||||||
|
"wezterm"
|
||||||
"zed"
|
"zed"
|
||||||
];
|
];
|
||||||
masApps = { };
|
masApps = { };
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ in
|
|||||||
./ruby
|
./ruby
|
||||||
./sesh
|
./sesh
|
||||||
./skhd
|
./skhd
|
||||||
|
./wezterm
|
||||||
./wget
|
./wget
|
||||||
./yabai
|
./yabai
|
||||||
./yazi
|
./yazi
|
||||||
@@ -36,6 +37,37 @@ in
|
|||||||
config = {
|
config = {
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
|
|
||||||
|
home.activation = {
|
||||||
|
# Install terminfo for wezterm
|
||||||
|
installWeztermProfile = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
tempfile=$(mktemp) \
|
||||||
|
&& ${pkgs.curl}/bin/curl -o $tempfile https://raw.githubusercontent.com/wez/wezterm/main/termwiz/data/wezterm.terminfo \
|
||||||
|
&& tic -x -o ~/.terminfo $tempfile \
|
||||||
|
&& rm $tempfile
|
||||||
|
'';
|
||||||
|
# Install custom icon for WezTerm
|
||||||
|
setupWezTermCustomIcon = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||||
|
icon_path="$HOME/.config/wezterm/terminal.icns"
|
||||||
|
app_path="/Applications/WezTerm.app"
|
||||||
|
|
||||||
|
$DRY_RUN_CMD mkdir -p "$(dirname "$icon_path")"
|
||||||
|
$DRY_RUN_CMD cp -f ${./wezterm/wezterm.icns} "$icon_path"
|
||||||
|
|
||||||
|
if [ -d "$app_path" ]; then
|
||||||
|
$DRY_RUN_CMD cp "$icon_path" "$app_path"/Contents/Resources/terminal.icns
|
||||||
|
|
||||||
|
# Touch the app to refresh Finder
|
||||||
|
$DRY_RUN_CMD touch "$app_path"
|
||||||
|
$DRY_RUN_CMD ${pkgs.darwin.xattr}/bin/xattr -rc "$app_path"
|
||||||
|
|
||||||
|
$VERBOSE_ECHO "Applied custom icon to WezTerm.app"
|
||||||
|
$DRY_RUN_CMD touch "$app_path"
|
||||||
|
else
|
||||||
|
$VERBOSE_ECHO "WezTerm.app not found in /Applications. Custom icon not applied."
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
@@ -51,6 +83,7 @@ in
|
|||||||
comma # Comma runs software without installing it
|
comma # Comma runs software without installing it
|
||||||
nixd # Nix language server
|
nixd # Nix language server
|
||||||
nixpkgs-fmt # Nix code formatter
|
nixpkgs-fmt # Nix code formatter
|
||||||
|
darwin.xattr # Display and manipulate extended attributes
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
10
nix/home/wezterm/default.nix
Normal file
10
nix/home/wezterm/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = builtins.readFile ./wezterm.lua;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [ pkgs.wezterm ];
|
||||||
|
}
|
||||||
BIN
nix/home/wezterm/wezterm.icns
Normal file
BIN
nix/home/wezterm/wezterm.icns
Normal file
Binary file not shown.
@@ -7,9 +7,6 @@ sudo -v
|
|||||||
echo "Installing Xcode Developer Tools"
|
echo "Installing Xcode Developer Tools"
|
||||||
xcode-select --install
|
xcode-select --install
|
||||||
|
|
||||||
# Download wezterm.terminfo
|
|
||||||
curl https://raw.githubusercontent.com/wez/wezterm/master/termwiz/data/wezterm.terminfo | tic -x -
|
|
||||||
|
|
||||||
# TMUX Plugin Manager
|
# TMUX Plugin Manager
|
||||||
echo "Installing TMUX Plugin Manager"
|
echo "Installing TMUX Plugin Manager"
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
|
|||||||
Reference in New Issue
Block a user