Convert tmux config to Nix and personalize system configuration
This commit is contained in:
@@ -1,40 +1,38 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
history = {
|
||||
path = "${config.xdg.configHome}/zsh/zsh_history";
|
||||
size = 10000;
|
||||
save = 10000;
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
# Custom shell initialization
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(starship init zsh)"
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
bindkey '^S' history-incremental-search-forward
|
||||
'';
|
||||
|
||||
promptInit = ''
|
||||
autoload -Uz vcs_info
|
||||
precmd() { vcs_info }
|
||||
zstyle ':vcs_info:git:*' formats '%b'
|
||||
setopt PROMPT_SUBST
|
||||
PROMPT='%F{green}%n@%m%f:%F{blue}%~%f %F{240}''${vcs_info_msg_0_}%f %# '
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
ls = "exa -l";
|
||||
la = "exa -la";
|
||||
tree = "exa --tree";
|
||||
cat = "bat";
|
||||
cd = "z";
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "agkozak";
|
||||
repo = "zsh-z";
|
||||
rev = "v1.12.0";
|
||||
sha256 = "sha256-z7YhKUpn6uEEGT1iFSBpUG+w0D1M9YsvvZW8PwDh8T8=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.starship.enable = true;
|
||||
programs.direnv.enable = true;
|
||||
programs.direnv.nix-direnv.enable = true;
|
||||
|
||||
home.activation.createZshHistDir = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p "${config.xdg.configHome}/zsh"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user