From 01197656cd45be8d5d80965cbee0884febf12997 Mon Sep 17 00:00:00 2001 From: Origami404 Date: Sun, 18 Jan 2026 20:26:48 +0800 Subject: [PATCH] =?UTF-8?q?[zsh]=20=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/hosts/hypnos.nix | 6 ++++-- home/modules/zsh.nix | 19 +++++++------------ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/home/hosts/hypnos.nix b/home/hosts/hypnos.nix index 92d5283..50f21a7 100644 --- a/home/hosts/hypnos.nix +++ b/home/hosts/hypnos.nix @@ -12,7 +12,9 @@ ../modules/llm.nix ]; - programs.fish.shellAliases = { - "flake-update" = "home-manager switch --flake ${config.home.homeDirectory}/flakes#origami@hypnos"; + programs.zsh.shellAliases = { + "hm-update" = "home-manager switch --flake ${config.home.homeDirectory}/flakes#origami@hypnos"; }; + # 外壳同款配色 + programs.zsh.initContent = "zstyle ':prompt:grml:*:items:user' pre '%F{#82C8E5}'"; } diff --git a/home/modules/zsh.nix b/home/modules/zsh.nix index 41dc71e..6c7a371 100644 --- a/home/modules/zsh.nix +++ b/home/modules/zsh.nix @@ -2,21 +2,16 @@ { programs.zsh = { enable = true; - plugins = [ - { - name = "zsh-autosuggestions"; - src = pkgs.fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-autosuggestions"; - rev = "v0.7.1"; - hash = "sha256-vpTyYq9ZgfgdDsWzjxVAE7FZH4MALMNZIFyEOBLm5Qo="; - }; - } - ]; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; }; - home.file.".zshrc".source = ./zsh/.zshrc; + home.shell.enableZshIntegration = true; + home.file.".zsh.d" = { source = ./zsh/.zsh.d; recursive = true; }; + home.file.".zshrc.o4".source = ./zsh/.zshrc; + programs.zsh.initContent = "source $HOME/.zshrc.o4"; }