From 62b4adfff4008b8b36d4fc19b0fc85716b55df0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Fri, 31 May 2024 17:49:42 +0200 Subject: [PATCH] Initial zsh config finished --- NixOS/modules/zsh/config.nix | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/NixOS/modules/zsh/config.nix b/NixOS/modules/zsh/config.nix index 4ab165a..7d0d777 100644 --- a/NixOS/modules/zsh/config.nix +++ b/NixOS/modules/zsh/config.nix @@ -23,6 +23,13 @@ PYTHONDONTWRITEBYTECODE = "1"; GOPATH = "${config.xdg.dataHome}/go"; }; + home.file = { + "${config.xdg.configHome}/zsh/keys.zsh".source = files/keys.zsh; + "${config.xdg.configHome}/zsh/term.zsh".source = files/term.zsh; + "${config.xdg.configHome}/zsh/p10k.zsh".source = files/p10k.zsh; + "${config.xdg.configHome}/zsh/completion.zsh".source = files/completion.zsh; + "${config.xdg.configHome}/zsh/waypipe.zsh".source = files/waypipe.zsh; + }; programs.command-not-found.enable = true; programs.zoxide = { @@ -31,7 +38,6 @@ }; programs.fzf = { enable = true; - enableZshIntegration = true; }; programs.zsh = { enable = true; @@ -39,6 +45,20 @@ syntaxHighlighting.enable = false; autosuggestion.enable = true; + initExtraFirst = '' + source ${config.xdg.configHome}/zsh/p10k.zsh + function zvm_after_init() { + source ${config.xdg.configHome}/zsh/keys.zsh + source ${config.xdg.configHome}/zsh/term.zsh + source ${config.xdg.configHome}/zsh/completion.zsh + source ${config.xdg.configHome}/zsh/waypipe.zsh + if [ -n "\$\{commands[fzf-share]\}" ]; then + source "$(fzf-share)/key-bindings.zsh" + source "$(fzf-share)/completion.zsh" + fi + } + ''; + shellAliases = { mallorea = "run_waypipe mallorea"; vault = "run_waypipe vault"; @@ -66,26 +86,6 @@ history.path = "${config.xdg.dataHome}/zsh/history"; autocd = true; plugins = [ - { - name = "powerlevel10k-config"; - src = ./files; - file = "p10k.zsh"; - } - { - name = "term-config"; - src = ./files; - file = "term.zsh"; - } - { - name = "key-config"; - src = ./files; - file = "keys.zsh"; - } - { - name = "waypipe-config"; - src = ./files; - file = "waypipe.zsh"; - } { name = "zsh-powerlevel10k"; src = "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/";