summaryrefslogtreecommitdiff
path: root/odino/home-manager/leo/programs/zsh.nix
diff options
context:
space:
mode:
authorLeonardo <noreply@leoflo.me>2025-11-03 22:16:55 +0100
committerLeonardo <noreply@leoflo.me>2025-11-03 22:16:55 +0100
commit3925cf2bb704645de9d00d2131ddb08712d4f620 (patch)
treeae5f85f160d8b65a6eac9625752ae15ee5be530e /odino/home-manager/leo/programs/zsh.nix
downloadnixos-3925cf2bb704645de9d00d2131ddb08712d4f620.tar.gz
nixos-3925cf2bb704645de9d00d2131ddb08712d4f620.zip
primo commit
Diffstat (limited to 'odino/home-manager/leo/programs/zsh.nix')
-rw-r--r--odino/home-manager/leo/programs/zsh.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/odino/home-manager/leo/programs/zsh.nix b/odino/home-manager/leo/programs/zsh.nix
new file mode 100644
index 0000000..87dd335
--- /dev/null
+++ b/odino/home-manager/leo/programs/zsh.nix
@@ -0,0 +1,43 @@
+{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 = "fishy";
+ plugins = [ "git" "ssh" ];
+ };
+
+ shellAliases = {
+ ls = "ls -lh --color=auto";
+ l = "ls";
+ ll = "ls -a";
+ ssh = "TERM=xterm-256color ssh";
+
+ update-system = "sudo nixos-rebuild switch --flake ~/nixos#odino";
+ update-home = "home-manager switch --flake ~/nixos#odino";
+ };
+
+ 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
+ '';
+ };
+ };
+}