Files
nixos-config/modules/home/terminal.nix

147 lines
3.9 KiB
Nix
Raw Normal View History

2025-09-13 02:38:36 -04:00
{
config,
2025-10-16 15:20:59 -04:00
pkgs,
2025-09-13 02:38:36 -04:00
...
}:
{
programs = {
alacritty = {
enable = true;
settings = {
general = {
import = [ "${config.xdg.configHome}/alacritty/themes/noctalia.toml" ];
};
font = {
normal = {
family = "${config.stylix.fonts.monospace.name}";
style = "Regular";
};
size = config.stylix.fonts.sizes.terminal;
};
};
};
2025-09-13 02:38:36 -04:00
direnv = {
enable = true;
enableZshIntegration = true;
};
2025-11-16 01:17:54 -05:00
fastfetch = {
enable = true;
};
foot = {
enable = true;
server.enable = false;
settings = {
main = {
term = "xterm-256color";
include = "${config.xdg.configHome}/foot/themes/noctalia";
dpi-aware = "no";
font = "${config.stylix.fonts.monospace.name}:size=${toString config.stylix.fonts.sizes.terminal}";
};
mouse = {
hide-when-typing = "yes";
};
};
};
2025-12-07 21:26:11 -05:00
fzf = {
enable = true;
enableZshIntegration = true;
};
2025-10-16 15:20:59 -04:00
starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = true;
format = pkgs.lib.concatStrings [
"[ [\\[](1)$username([@](bold 2)$hostname)[\\]:](1) $directory( $git_branch)](5)"
2025-10-16 15:20:59 -04:00
"$line_break"
"[ $character](5)"
2025-10-16 15:20:59 -04:00
];
2025-11-22 18:47:06 -05:00
username = {
style_root = "white";
format = "[$user](3)";
disabled = false;
2025-11-22 18:47:06 -05:00
show_always = true;
};
hostname = {
format = "[$hostname](bold 4)";
disabled = false;
2025-11-22 18:47:06 -05:00
ssh_only = false;
};
character = {
success_symbol = "[](bold 5)";
error_symbol = "[](bold 5)";
vimcmd_symbol = "[](bold 5)";
2025-11-22 18:47:06 -05:00
};
2025-10-16 15:20:59 -04:00
directory = {
read_only = "";
format = "[ $path](5)";
read_only_style = "bold white";
truncation_length = 5;
2025-10-16 15:20:59 -04:00
};
git_branch = {
symbol = "";
style = "bright-black";
2025-11-22 18:47:06 -05:00
format = "[$symbol $branch]($style)";
2025-10-16 15:20:59 -04:00
};
scan_timeout = 100;
};
};
zellij = {
enable = true;
enableZshIntegration = true;
settings = {
theme = "catppuccin-mocha";
show_startup_tips = false;
};
};
2025-12-07 21:26:11 -05:00
zoxide = {
enable = true;
enableZshIntegration = true;
};
2025-09-13 02:38:36 -04:00
zsh = {
enable = true;
2025-12-07 21:26:11 -05:00
enableCompletion = false;
antidote = {
enable = true;
plugins = [
"Aloxaf/fzf-tab"
];
};
2025-09-13 02:38:36 -04:00
autosuggestion.enable = true;
dotDir = "${config.xdg.configHome}/zsh";
2025-12-07 21:26:11 -05:00
history = {
append = true;
findNoDups = true;
ignoreSpace = true;
ignoreDups = true;
saveNoDups = true;
share = true;
};
historySubstringSearch = {
enable = true;
searchDownKey = "^p";
searchUpKey = "^n";
};
initContent = ''
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
# NOTE: don't use escape sequences (like '%F{red}%d%f') here, fzf-tab will ignore them
zstyle ':completion:*:descriptions' format '[%d]'
# preview directory's content when completing cd or zoxide
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# custom fzf flags
# NOTE: fzf-tab does not follow FZF_DEFAULT_OPTS by default
zstyle ':fzf-tab:*' fzf-flags --color=fg:1,fg+:2 --bind=tab:accept
# switch group using `<` and `>`
zstyle ':fzf-tab:*' switch-group '<' '>'
'';
2025-09-13 02:38:36 -04:00
syntaxHighlighting.enable = true;
2025-10-23 23:52:24 -04:00
shellAliases = {
2025-11-16 01:17:54 -05:00
ff = "fastfetch";
};
2025-09-13 02:38:36 -04:00
};
};
}