From 88414eb3469788d9ae20b22fa7d1c41c8208e9b8 Mon Sep 17 00:00:00 2001 From: luochen570 <1160510664@qq.com> Date: Tue, 26 May 2026 12:50:23 +0800 Subject: [PATCH] fix: replace invalid 'options' attr with setopt in initExtra home-manager's programs.zsh has no 'options' attribute. Use 'setopt correct' and 'setopt interactive_comments' inside initExtra instead. --- home/zsh.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/home/zsh.nix b/home/zsh.nix index 429232f..6496206 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -14,11 +14,14 @@ export PATH="$HOME/.hermes/node/bin:$PATH" ''; - # Shell 选项 - 对应 .zshrc 的 setopt - options = [ "correct" "interactive_comments" ]; + # Shell 选项 - 对应 .zshrc 的 setopt(NixOS 中需写在 initExtra 里) + # options 属性在 home-manager 中不存在,用 setopt 命令代替 # 初始化 - 对应 .zshrc 中的 Powerlevel10k instant prompt 和函数定义 initExtra = '' + # Shell options + setopt correct + setopt interactive_comments # Powerlevel10k instant prompt if [[ -r "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then source "''${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-''${(%):-%n}.zsh"