From f1a8c729d17c20ba313dbbb7ab9776782e1ce8fc Mon Sep 17 00:00:00 2001 From: mikl Date: Wed, 1 Jul 2026 00:33:36 +0300 Subject: [PATCH] refactor: use modern initContent with lib.mkBefore --- home/zsh.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/home/zsh.nix b/home/zsh.nix index d3519b3..447faee 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { programs.zsh = { enable = true; @@ -46,11 +46,6 @@ ff = "fastfetch"; }; - # Fix PATH at the very beginning of .zshrc - initExtraFirst = '' - export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH" - ''; - # Environment setup (zshenv) envExtra = '' if [ -x "/opt/homebrew/bin/brew" ]; then @@ -58,8 +53,11 @@ fi ''; - # Init content - runs on shell start (after PATH is set) - initExtra = '' + # Init content - uses lib.mkBefore to run before home-manager generated code + initContent = lib.mkBefore '' + export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH" + '' + + '' # Show fastfetch on shell start echo fastfetch