refactor: use modern initContent with lib.mkBefore
This commit is contained in:
parent
af14e5d38e
commit
f1a8c729d1
1 changed files with 6 additions and 8 deletions
14
home/zsh.nix
14
home/zsh.nix
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -46,11 +46,6 @@
|
||||||
ff = "fastfetch";
|
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)
|
# Environment setup (zshenv)
|
||||||
envExtra = ''
|
envExtra = ''
|
||||||
if [ -x "/opt/homebrew/bin/brew" ]; then
|
if [ -x "/opt/homebrew/bin/brew" ]; then
|
||||||
|
|
@ -58,8 +53,11 @@
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Init content - runs on shell start (after PATH is set)
|
# Init content - uses lib.mkBefore to run before home-manager generated code
|
||||||
initExtra = ''
|
initContent = lib.mkBefore ''
|
||||||
|
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:$PATH"
|
||||||
|
''
|
||||||
|
+ ''
|
||||||
# Show fastfetch on shell start
|
# Show fastfetch on shell start
|
||||||
echo
|
echo
|
||||||
fastfetch
|
fastfetch
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue