better zsh config
This commit is contained in:
parent
593e153a55
commit
4a9afa1c79
73
common.nix
73
common.nix
|
@ -348,6 +348,7 @@ in
|
||||||
pulseaudio
|
pulseaudio
|
||||||
qmk
|
qmk
|
||||||
ssh-audit
|
ssh-audit
|
||||||
|
starship
|
||||||
sysstat
|
sysstat
|
||||||
tcl
|
tcl
|
||||||
texlive.combined.scheme-small
|
texlive.combined.scheme-small
|
||||||
|
@ -486,40 +487,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# use ZSH per default with a proper config
|
# use ZSH per default
|
||||||
|
programs.zsh.enable = true;
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
programs.starship.enable = true;
|
environment.shells = with pkgs; [ zsh ];
|
||||||
programs.zsh = {
|
|
||||||
# zsh with extras wanted
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
|
|
||||||
# some env vars I want in all of my shells
|
|
||||||
shellInit = ''
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share
|
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# aliases
|
|
||||||
shellAliases = {
|
|
||||||
# system build/update/cleanup
|
|
||||||
update = "sudo nixos-rebuild switch";
|
|
||||||
upgrade = "sudo nixos-rebuild switch --upgrade";
|
|
||||||
gc = "sudo nix-collect-garbage --delete-older-than 7d";
|
|
||||||
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
|
|
||||||
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
|
|
||||||
|
|
||||||
# ssh around in the local network
|
|
||||||
mac = "ssh mac.fritz.box";
|
|
||||||
macroot = "ssh root@mac.fritz.box";
|
|
||||||
mini = "ssh mini.fritz.box";
|
|
||||||
miniroot = "ssh root@mini.fritz.box";
|
|
||||||
neko = "ssh neko.fritz.box";
|
|
||||||
nekoroot = "ssh root@neko.fritz.box";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable VirtualBox
|
# enable VirtualBox
|
||||||
virtualisation.virtualbox.host.enable = true;
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
@ -553,7 +524,9 @@ in
|
||||||
# initial version
|
# initial version
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
|
|
||||||
# generate the shell config
|
# zsh with some nice prompt
|
||||||
|
programs.starship.enable = true;
|
||||||
|
programs.zoxide.enable = true;
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -585,8 +558,36 @@ in
|
||||||
# initial version
|
# initial version
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
|
|
||||||
# generate the shell config
|
# zsh with some nice prompt and extra main user configuration
|
||||||
programs.zsh.enable = true;
|
programs.starship.enable = true;
|
||||||
|
programs.zoxide.enable = true;
|
||||||
|
programs.zsh = {
|
||||||
|
# zsh with extras wanted
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autocd = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
history.share = false;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
|
# aliases
|
||||||
|
shellAliases = {
|
||||||
|
# system build/update/cleanup
|
||||||
|
update = "sudo nixos-rebuild switch";
|
||||||
|
upgrade = "sudo nixos-rebuild switch --upgrade";
|
||||||
|
gc = "sudo nix-collect-garbage --delete-older-than 7d";
|
||||||
|
verify = "sudo nix --extra-experimental-features nix-command store verify --all";
|
||||||
|
optimize = "sudo nix --extra-experimental-features nix-command store optimise";
|
||||||
|
|
||||||
|
# ssh around in the local network
|
||||||
|
mac = "ssh mac.fritz.box";
|
||||||
|
macroot = "ssh root@mac.fritz.box";
|
||||||
|
mini = "ssh mini.fritz.box";
|
||||||
|
miniroot = "ssh root@mini.fritz.box";
|
||||||
|
neko = "ssh neko.fritz.box";
|
||||||
|
nekoroot = "ssh root@neko.fritz.box";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# enable keychain
|
# enable keychain
|
||||||
programs.keychain = {
|
programs.keychain = {
|
||||||
|
|
Loading…
Reference in a new issue