Simplify zsh config
This commit is contained in:
parent
2b4b6dfe83
commit
ce7690e9d1
1 changed files with 15 additions and 30 deletions
|
@ -1,35 +1,20 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
programs.zsh = {
|
||||||
programs = let my-pkgs = import ../../pkgs;
|
enable = true;
|
||||||
in {
|
enableAutosuggestions = true;
|
||||||
zsh = {
|
enableCompletion = true;
|
||||||
|
history = {
|
||||||
|
save = 100000;
|
||||||
|
size = 100000;
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
${builtins.readFile ./zshrc}
|
||||||
|
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
source ${./p10k.zsh}
|
||||||
|
'';
|
||||||
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableAutosuggestions = true;
|
plugins = [ "colored-man-pages" ];
|
||||||
enableCompletion = true;
|
|
||||||
history = {
|
|
||||||
save = 100000;
|
|
||||||
size = 100000;
|
|
||||||
};
|
|
||||||
initExtra = ''
|
|
||||||
# If running from tty1 start sway
|
|
||||||
if [ "$(tty)" = "/dev/tty1" ]; then
|
|
||||||
. ${my-pkgs.start-ssh-agent}/bin/start-ssh-agent
|
|
||||||
while true; do
|
|
||||||
select-mode
|
|
||||||
echo Launching sway at $(date) >> ~/tmp/sway.log
|
|
||||||
${pkgs.sway}/bin/sway >> ~/tmp/sway.log
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
${builtins.readFile ./zshrc}
|
|
||||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
|
||||||
source ${./p10k.zsh}
|
|
||||||
'';
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [ "colored-man-pages" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue