From 4f8d49a48ccca1e1f8dc7da2183f3584a146cede Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sat, 7 Mar 2026 23:29:39 +0100 Subject: [PATCH] Working on termonal stuff --- .../applications/terminal_shell/zsh.nix | 67 ++++++++++++++----- 1 file changed, 52 insertions(+), 15 deletions(-) diff --git a/Droidnix/generated/system/applications/terminal_shell/zsh.nix b/Droidnix/generated/system/applications/terminal_shell/zsh.nix index af7786d3e..358bfddae 100644 --- a/Droidnix/generated/system/applications/terminal_shell/zsh.nix +++ b/Droidnix/generated/system/applications/terminal_shell/zsh.nix @@ -10,45 +10,82 @@ let in { home-manager.users.${user.username} = { + # Install and enable Zsh programs.zsh = { enable = true; enableCompletion = true; dotDir = zshConfigDir; - autosuggestion.enable = true; + autosuggestions.enable = true; syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; - theme = ""; + theme = "agnoster"; # Popular minimal theme plugins = [ "git" "sudo" - "extract" - "colored-man-pages" - "command-not-found" - "history" "docker" "kubectl" + "zsh-autosuggestions" + "zsh-syntax-highlighting" + "history" + "command-not-found" + "extract" + "colored-man-pages" ]; }; + # Shell options (setopt) + shellAliases = { + ls = "exa --icons -a --group-directories-first"; + ll = "exa --icons -la --group-directories-first"; + grep = "grep --color=auto"; + }; }; - # Single source of truth for .zshrc + # Consolidated .zshrc with best practices xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [ - "# Zsh options" - "setopt AUTO_CD" - "setopt CORRECT" - "setopt INTERACTIVE_COMMENTS" - "" + "# Enable Powerlevel10k (if installed)" + "${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme" "# Oh-My-Zsh" "export ZSH=\"${zshConfigDir}\"" "source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\"" "source \"${zshConfigDir}/oh-my-zsh.sh\"" "" - "# Starship" + "# Zsh options" + "setopt AUTO_CD" + "setopt CORRECT" + "setopt INTERACTIVE_COMMENTS" + "setopt APPEND_HISTORY" + "setopt INC_APPEND_HISTORY" + "setopt HIST_IGNORE_ALL_DUPS" + "setopt HIST_REDUCE_BLANKS" + "setopt HIST_SAVE_NO_DUPS" + "setopt HIST_VERIFY" + "setopt SHARE_HISTORY" + "" + "# Starship prompt (if enabled)" "eval \"$(starship init zsh)\"" "" - "# User customizations (if any)" - "source \"${zshConfigDir}/custom.zsh\" # Optional: for user-specific additions" + "# fzf key bindings and completion" + "source \"${pkgs.fzf}/shell/key-bindings.zsh\"" + "source \"${pkgs.fzf}/shell/completion.zsh\"" + "" + "# Load direnv" + "eval \"$(direnv hook zsh)\"" + "" + "# Load nix-direnv (if using direnv with Nix)" + "if [ -f \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\" ]; then" + " source \"${pkgs.nix-direnv}/share/nix-direnv/direnvrc\"" + "fi" + "" + "# User-specific customizations" + "source \"${zshConfigDir}/custom.zsh\" 2>/dev/null" ]; + + # Optional: User customizations (managed separately) + xdg.configFile."zsh/custom.zsh".text = '' + # Add your custom aliases, functions, and exports here + export EDITOR="nvim" + export PATH="$HOME/.local/bin:$PATH" + ''; }; }