summaryrefslogtreecommitdiff
path: root/components/programs/zsh.nix
diff options
context:
space:
mode:
authorLeonardo <noreply@leoflo.me>2026-02-28 16:27:59 +0100
committerLeonardo <noreply@leoflo.me>2026-02-28 19:02:07 +0100
commitbb11479130b0988e93408aa917cfc872d427d95f (patch)
tree58d37004d9529f927fcab0a5672bc6697d9b3c24 /components/programs/zsh.nix
parent1507e4e369bd73b85f191fef20a7509283a418aa (diff)
downloadnixos-bb11479130b0988e93408aa917cfc872d427d95f.tar.gz
nixos-bb11479130b0988e93408aa917cfc872d427d95f.zip
nuovo layout
Diffstat (limited to 'components/programs/zsh.nix')
-rw-r--r--components/programs/zsh.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/components/programs/zsh.nix b/components/programs/zsh.nix
new file mode 100644
index 0000000..9ace5fd
--- /dev/null
+++ b/components/programs/zsh.nix
@@ -0,0 +1,35 @@
+{lib, config, ...}: {
+ options.zsh.enable = lib.mkEnableOption "ZSH config";
+
+ config = lib.mkIf config.zsh.enable {
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ enableVteIntegration = true;
+
+ syntaxHighlighting.enable = true;
+
+ history.size = 10000;
+
+ oh-my-zsh = {
+ enable = true;
+ theme = "robbyrussell";
+
+ plugins = [ "git" "ssh" ];
+ };
+
+ initContent = ''
+ # Ctrl + arrow keys
+ bindkey '^[Oc' forward-word
+ bindkey '^[Od' backward-word
+ bindkey '^[[1;5D' backward-word
+ bindkey '^[[1;5C' forward-word
+ bindkey '^H' backward-kill-word
+
+ # Theme
+ autoload -U colors
+ colors
+ '';
+ };
+ };
+}