Zsh: Difference between revisions
m Removed thefuck extention: it has been removed from nixpkgs and replaced by pay-respects |
m style fixes |
||
| Line 13: | Line 13: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.zsh.enable = true; | |||
users.extraUsers.myuser = { | |||
... | |||
shell = pkgs.zsh; | |||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 31: | Line 31: | ||
{{file|home.nix|nix| | {{file|home.nix|nix| | ||
<nowiki> | <nowiki> | ||
home-manager.users.myuser = { | |||
programs.zsh.enable = true; | |||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 43: | Line 43: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.zsh.enable = true; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 55: | Line 55: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.zsh = { | |||
enable = true; | |||
enableCompletion = true; | |||
autosuggestions.enable = true; | |||
syntaxHighlighting.enable = true; | |||
shellAliases = { | |||
ll = "ls -l"; | |||
edit = "sudo -e"; | |||
update = "sudo nixos-rebuild switch"; | |||
}; | |||
histSize = 10000; | |||
histFile = "$HOME/.zsh_history"; | |||
setOptions = [ | |||
"HIST_IGNORE_ALL_DUPS" | |||
]; | |||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 84: | Line 84: | ||
{{file|/etc/nixos/configuration.nix|nix| | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.zsh = { | |||
enable = true; | |||
ohMyZsh = { | |||
enable = true; | enable = true; | ||
plugins = [ | |||
"git" | |||
"z" | |||
]; | |||
theme = "robbyrussell"; | |||
}; | }; | ||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 106: | Line 106: | ||
{{file|home.nix|nix| | {{file|home.nix|nix| | ||
<nowiki> | <nowiki> | ||
programs.zsh = { | |||
enable = true; | |||
enableCompletion = true; | |||
autosuggestion.enable = true; | |||
syntaxHighlighting.enable = true; | |||
shellAliases = { | |||
ll = "ls -l"; | |||
edit = "sudo -e"; | |||
update = "sudo nixos-rebuild switch"; | |||
}; | |||
history.size = 10000; | |||
history.ignoreAllDups = true; | |||
history.path = "$HOME/.zsh_history"; | |||
history.ignorePatterns = ["rm *" "pkill *" "cp *"]; | |||
}; | |||
</nowiki> | </nowiki> | ||
}} | }} | ||
| Line 233: | Line 233: | ||
==== Hide configuration for new users ==== | ==== Hide configuration for new users ==== | ||
Meaning this message:<syntaxhighlight | Meaning this message:<syntaxhighlight> | ||
This is the Z Shell configuration function for new users, | This is the Z Shell configuration function for new users, | ||
zsh-newuser-install. | zsh-newuser-install. | ||