2024-06-06 12:41:31 +02:00
|
|
|
{ config, pkgs, ... }:
|
2024-05-24 21:33:00 +02:00
|
|
|
|
|
|
|
{
|
2024-06-06 12:41:31 +02:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
fzf
|
|
|
|
zsh-fzf-tab
|
|
|
|
zsh-completions
|
|
|
|
zsh-autosuggestions
|
|
|
|
zsh-syntax-highlighting
|
|
|
|
nix-zsh-completions
|
2024-07-09 17:26:56 +02:00
|
|
|
#thefuck
|
2024-06-06 12:41:31 +02:00
|
|
|
];
|
|
|
|
|
2024-06-09 22:46:31 +02:00
|
|
|
home.sessionVariables = {
|
|
|
|
ZDOTDIR = "${config.xdg.configHome}/zsh";
|
|
|
|
};
|
|
|
|
|
2024-06-06 12:41:31 +02:00
|
|
|
home.file."${config.xdg.configHome}/zsh/conf.d" = {
|
2024-05-24 21:33:00 +02:00
|
|
|
source = ./config/conf.d;
|
|
|
|
recursive = true;
|
|
|
|
};
|
2024-06-06 12:41:31 +02:00
|
|
|
|
|
|
|
home.file."${config.xdg.configHome}/zsh/.zshrc" = {
|
2024-05-24 21:33:00 +02:00
|
|
|
text = ''
|
|
|
|
#!/usr/bin/env zsh
|
|
|
|
SYNTAX_FILE="${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
2024-06-06 12:41:31 +02:00
|
|
|
|
|
|
|
# On systems that are not on glibc 2.38, loading fzf-tab will fail. This prevents that.
|
|
|
|
if [ -f "/lib/x86_64-linux-gnu/libc.so.6" ]; then
|
|
|
|
GLIBC_VERSION="$(/lib/x86_64-linux-gnu/libc.so.6 | head -n1 | sed -e 's/.* //g' | rev | cut -c2- | rev)"
|
|
|
|
if [ "$GLIBC_VERSION" = "2.38" ]; then
|
|
|
|
FZF_TAB_FILE="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
FZF_TAB_FILE="${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh"
|
|
|
|
fi
|
|
|
|
|
2024-05-24 21:33:00 +02:00
|
|
|
AUTOSUGGEST_FILE="${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
|
|
|
'' + (builtins.readFile config/.zshrc);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|