Split up terminal.nix further

This commit is contained in:
Sridhar Ratnakumar 2023-04-08 11:11:43 -04:00
parent e03c176368
commit b13166fc6b
5 changed files with 42 additions and 42 deletions

View file

@ -25,10 +25,9 @@
imports = [
self.homeModules.common
./zsh.nix
./kitty.nix
# ./emacs.nix
];
};
};
};

23
home/kitty.nix Normal file
View file

@ -0,0 +1,23 @@
{
# Better terminal, with good rendering.
programs.kitty = {
enable = true;
# Pick "name" from https://github.com/kovidgoyal/kitty-themes/blob/master/themes.json
theme = "Tokyo Night";
font = {
name = "Monaco";
size = 14;
};
keybindings = {
"kitty_mod+e" = "kitten hints"; # https://sw.kovidgoyal.net/kitty/kittens/hints/
};
settings = {
# https://github.com/kovidgoyal/kitty/issues/371#issuecomment-1095268494
# mouse_map = "left click ungrabbed no-op";
# Ctrl+Shift+click to open URL.
confirm_os_window_close = "0";
# https://github.com/kovidgoyal/kitty/issues/847
macos_option_as_alt = "yes";
};
};
}

View file

@ -8,19 +8,6 @@
ripgrep
htop
nix-output-monitor
# Open tmux for current project.
(pkgs.writeShellApplication {
name = "pux";
runtimeInputs = [ pkgs.tmux ];
text = ''
PRJ="''$(zoxide query -i)"
echo "Launching tmux for ''$PRJ"
set -x
cd "''$PRJ" && \
exec tmux -S "''$PRJ".tmux attach
'';
})
];
programs = {
@ -29,32 +16,6 @@
zoxide.enable = true;
fzf.enable = true;
jq.enable = true;
# Better terminal, with good rendering.
kitty = {
enable = true;
# Pick "name" from https://github.com/kovidgoyal/kitty-themes/blob/master/themes.json
theme = "Tokyo Night";
font = {
name = "Monaco";
size = 14;
};
keybindings = {
"kitty_mod+e" = "kitten hints"; # https://sw.kovidgoyal.net/kitty/kittens/hints/
};
settings = {
# https://github.com/kovidgoyal/kitty/issues/371#issuecomment-1095268494
# mouse_map = "left click ungrabbed no-op";
# Ctrl+Shift+click to open URL.
confirm_os_window_close = "0";
# https://github.com/kovidgoyal/kitty/issues/847
macos_option_as_alt = "yes";
};
};
nix-index = {
enable = true;
enableZshIntegration = true;
};
nix-index.enable = true;
};
}

View file

@ -36,4 +36,19 @@
# FIXME: This causes tmate to hang.
# extraConfig = config.xdg.configFile."tmux/tmux.conf".text;
};
home.packages = [
# Open tmux for current project.
(pkgs.writeShellApplication {
name = "pux";
runtimeInputs = [ pkgs.tmux ];
text = ''
PRJ="''$(zoxide query -i)"
echo "Launching tmux for ''$PRJ"
set -x
cd "''$PRJ" && \
exec tmux -S "''$PRJ".tmux attach
'';
})
];
}

View file

@ -14,4 +14,6 @@
# cf. https://developer.1password.com/docs/ssh/get-started#step-4-configure-your-ssh-or-git-client
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
'';
programs.nix-index.enableZshIntegration = true;
}