refactor: use modern initContent with lib.mkBefore

This commit is contained in:
mikl 2026-07-01 00:33:36 +03:00
parent af14e5d38e
commit f1a8c729d1

View file

@ -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