From dc6dc2b229985476ff3114a2efd393c84e9f871a Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 13 Jul 2023 17:15:13 +0200 Subject: [PATCH] zsh on cloud --- hosts/chmura/configuration.nix | 41 ++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/hosts/chmura/configuration.nix b/hosts/chmura/configuration.nix index b5f18e275..37f7a606c 100644 --- a/hosts/chmura/configuration.nix +++ b/hosts/chmura/configuration.nix @@ -20,7 +20,45 @@ ]; }; - programs.zsh.enable = true; + programs.zsh = { + enable = true; + shellAliases = { + cl = "clear"; + cp = "cp -ivr"; + mv = "mv -iv"; + rm = "trash -v"; + l = "ls -A --color=auto"; + e = "exa -lha --git"; + v = "nvim"; + kys = "shutdown now"; + g = "git"; + }; + initExtra = '' + bindkey '^H' backward-kill-word + ''; + history = { + path = "${config.xdg.dataHome}/zsh/zsh_history"; + size = 999999999; + extended = true; + ignoreSpace = true; + }; + enableAutosuggestions = true; + enableCompletion = true; + autocd = false; + dotDir = ".config/zsh"; + plugins = [ + { + name = "fast-syntax-highlighting"; + file = "fast-syntax-highlighting.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "zdharma-continuum"; + repo = "fast-syntax-highlighting"; + rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9"; + sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4="; + }; + } + ]; + }; users.users.chmura = { isNormalUser = true; @@ -28,7 +66,6 @@ shell = pkgs.zsh; packages = with pkgs; [ curl - wget neovim neofetch git