configure zsh with home manager
This commit is contained in:
parent
7eca12a6cf
commit
98faa338d6
6 changed files with 83 additions and 3 deletions
|
@ -6,6 +6,9 @@
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
./zsh
|
||||||
|
];
|
||||||
home = {
|
home = {
|
||||||
username = "yt";
|
username = "yt";
|
||||||
homeDirectory = "/home/yt";
|
homeDirectory = "/home/yt";
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
imports = [
|
||||||
|
./zsh
|
||||||
|
];
|
||||||
home = {
|
home = {
|
||||||
username = "yt";
|
username = "yt";
|
||||||
homeDirectory = "/home/yt";
|
homeDirectory = "/home/yt";
|
||||||
|
|
76
nix/home/yt/zsh/default.nix
Normal file
76
nix/home/yt/zsh/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion = {
|
||||||
|
enable = true;
|
||||||
|
strategy = [ "history" "completion" ];
|
||||||
|
};
|
||||||
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
highlighters = [ "brackets" "cursor" ];
|
||||||
|
};
|
||||||
|
autocd = true;
|
||||||
|
defaultKeymap = "emacs";
|
||||||
|
antidote = {
|
||||||
|
enable = true;
|
||||||
|
useFriendlyNames = true; # why not?
|
||||||
|
plugins = [
|
||||||
|
"zsh-users/zsh-completions"
|
||||||
|
"romkatv/powerlevel10k"
|
||||||
|
"Aloxaf/fzf-tab"
|
||||||
|
"z-shell/zsh-eza"
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/colored-man-pages"
|
||||||
|
"ohmyzsh/ohmyzsh path:plugins/git"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
history = {
|
||||||
|
ignoreDups = true;
|
||||||
|
ignoreAllDups = true;
|
||||||
|
ignoreSpace = true;
|
||||||
|
save = 50000;
|
||||||
|
size = 50000;
|
||||||
|
append = true;
|
||||||
|
};
|
||||||
|
historySubstringSearch= {
|
||||||
|
enable = true;
|
||||||
|
searchUpKey = "^p";
|
||||||
|
searchDownKey = "^n";
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
source ${./p10k.zsh}
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
|
zstyle ':completion:*' menu no
|
||||||
|
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
|
||||||
|
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-prewview 'ls $realpath'
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
"vi" = "nvim";
|
||||||
|
"vim" = "nvim";
|
||||||
|
"t" = "tmux";
|
||||||
|
"tl" = "tmux list-sessions";
|
||||||
|
"ta" = "tmux new-session -A -s";
|
||||||
|
"se" = "sudoedit";
|
||||||
|
"s" = "sudo";
|
||||||
|
"nrs" = "sudo nixos-rebuild switch --flake .";
|
||||||
|
"nrt" = "sudo nixos-rebuild test --flake .";
|
||||||
|
};
|
||||||
|
sessionVariables = {
|
||||||
|
"FZF_DEFAULT_COMMAND" = "rg";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zoxide = {
|
||||||
|
enable = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -179,7 +179,7 @@
|
||||||
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
# - verbose: Enable instant prompt and print a warning when detecting console output during
|
||||||
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
# zsh initialization. Choose this if you've never tried instant prompt, haven't
|
||||||
# seen the warning, or if you are unsure what this all means.
|
# seen the warning, or if you are unsure what this all means.
|
||||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose
|
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
|
||||||
|
|
||||||
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
# Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.
|
||||||
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
# For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload
|
|
@ -69,7 +69,6 @@ in {
|
||||||
};
|
};
|
||||||
users.users.root.openssh.authorizedKeys.keys =
|
users.users.root.openssh.authorizedKeys.keys =
|
||||||
[ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" ];
|
[ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdhAQYy0+vS+QmyCd0MAbqbgzyMGcsuuFyf6kg2yKge yt@ytlinux" ];
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
users.users.git = {
|
users.users.git = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|
|
@ -131,7 +131,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
};
|
};
|
||||||
programs.zsh.enable = true;
|
|
||||||
# security.sudo.wheelNeedsPassword = false;
|
# security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
|
Loading…
Add table
Reference in a new issue