Adds initial files
This commit is contained in:
60
home-manager/features/shell.nix
Normal file
60
home-manager/features/shell.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
# Set up the user's prompt as ZSH with Starship
|
||||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
envExtra = ''
|
||||
. "$HOME/.cargo/env"
|
||||
'';
|
||||
initExtra = ''
|
||||
# Make ^U work like it does in Bash
|
||||
bindkey "^U" backward-kill-line
|
||||
|
||||
# Disable the extra characters when pasting
|
||||
unsetopt bracketedpaste
|
||||
|
||||
alias 'p?'='ps ax | grep'
|
||||
'';
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
# theme = "powerlevel10k";
|
||||
plugins = [
|
||||
"git"
|
||||
"git-prompt"
|
||||
"direnv"
|
||||
"sudo"
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-autosuggestions";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-autosuggestions";
|
||||
rev = "0e810e5afa27acbd074398eefbe28d13005dbc15";
|
||||
hash = "sha256-85aw9OM2pQPsWklXjuNOzp9El1MsNb+cIiZQVHUzBnk=";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "zsh-syntax-highlighting";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "zsh-users";
|
||||
repo = "zsh-syntax-highlighting";
|
||||
rev = "5eb677bb0fa9a3e60f0eff031dc13926e093df92";
|
||||
hash = "sha256-KRsQEDRsJdF7LGOMTZuqfbW6xdV5S38wlgdcCM98Y/Q=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user