From 32b74fefd1805c2716f7b7810b7be1f160da81a7 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Wed, 19 Jul 2023 15:01:47 +0200 Subject: [PATCH] add sane zsh config --- flake.nix | 1 + modules/zsh.nix | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 modules/zsh.nix diff --git a/flake.nix b/flake.nix index 197bcf7..c486812 100755 --- a/flake.nix +++ b/flake.nix @@ -44,6 +44,7 @@ ./modules/mautrix-telegram.nix ./modules/sogo.nix ./modules/vaultwarden.nix + ./modules/zsh.nix ./modules/course-management.nix { fsr.enable_office_bloat = false; diff --git a/modules/zsh.nix b/modules/zsh.nix new file mode 100644 index 0000000..bb3ac04 --- /dev/null +++ b/modules/zsh.nix @@ -0,0 +1,36 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + # fzf + bat + duf + ]; + users.defaultUserShell = pkgs.zsh; + programs.fzf = { + fuzzyCompletion = true; + keybindings = true; + }; + programs.zsh = { + enable = true; + shellAliases = { + l = "ls -l"; + ll = "ls -la"; + la = "ls -a"; + less = "bat"; + }; + histSize = 100000; + histFile = "~/.local/share/zsh/history"; + autosuggestions = { + enable = true; + highlightStyle = "fg=#00bbbb,bold"; + }; + + shellInit = + '' + source ${pkgs.zsh-fzf-tab}/share/fzf-tab/fzf-tab.plugin.zsh + + zsh-newuser-install () {} + ''; + }; +} +