initialization
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [
|
||||
zoxide
|
||||
oh-my-posh
|
||||
];
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.zoxide.enable = true;
|
||||
programs.oh-my-posh.enable = true;
|
||||
|
||||
home.file.".config/oh-my-posh/config.omp.json" = {
|
||||
source = ./custom/config.omp.json;
|
||||
force = true;
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
plugins = [
|
||||
{
|
||||
name = "vi-mode";
|
||||
src = pkgs.zsh-vi-mode;
|
||||
file = "share/zsh-vi-mode/zsh-vi-mode.plugin.zsh";
|
||||
}
|
||||
{
|
||||
name = "autosuggestion";
|
||||
src = pkgs.zsh-autosuggestions;
|
||||
file = "share/zsh-autosuggestions/zsh-autosuggestions.zsh";
|
||||
}
|
||||
];
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
upd = "sudo nixos-rebuild switch --flake ~/Nixos/#biscuit";
|
||||
hupd = "home-manager switch --flake ~/Nixos/#biscuit --impure";
|
||||
agu = "pkill gjs & ags run ~/Nixos/packages/ags/custom/app.ts &";
|
||||
};
|
||||
history.size = 10000;
|
||||
oh-my-zsh = {
|
||||
plugins = [];
|
||||
enable = true;
|
||||
theme = "robbyrussell";
|
||||
extraConfig = ''
|
||||
zstyle ':completion:*' completer _expand _complete _ignored _approximate _expand_alias
|
||||
zstyle ':autocomplete:*' default-context curcontext
|
||||
zstyle ':autocomplete:*' min-input 0
|
||||
|
||||
setopt HIST_FIND_NO_DUPS
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# setopt autocd # cd without writing 'cd'
|
||||
setopt globdots # show dotfiles in autocomplete list
|
||||
'';
|
||||
};
|
||||
initContent = ''
|
||||
# Oh-My-Posh initialization for Zsh
|
||||
eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/config.omp.json)"
|
||||
|
||||
# zsh-autocomplete
|
||||
bindkey -M menuselect '^M' .accept-line # run code when selected completion
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user