order in zshrc to prevent ls alias overwrite

This commit is contained in:
Olaf 2025-05-08 18:33:15 +02:00
parent 11173367e5
commit 9834d4f970

View File

@ -10,6 +10,7 @@ let
email = "olaf@xolx.nl"; email = "olaf@xolx.nl";
in in
{ {
# Shared shell configuration # Shared shell configuration
zsh = { zsh = {
enable = true; enable = true;
@ -18,13 +19,15 @@ in
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ ]; plugins = [ ];
# theme = "agnoster"; # theme = "fishy";
theme = "ys"; # theme = "ys";
theme = "mrtazz";
}; };
plugins = [ # plugins = [ ];
]; initContent =
initExtraFirst = '' let
zshConfigEarlyInit = lib.mkOrder 500 ''
if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then if [[ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]]; then
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
. /nix/var/nix/profiles/default/etc/profile.d/nix.sh . /nix/var/nix/profiles/default/etc/profile.d/nix.sh
@ -62,11 +65,21 @@ in
# Use difftastic, syntax-aware diffing # Use difftastic, syntax-aware diffing
alias diff=difft alias diff=difft
# Always color ls and group directories
alias ls='ls --color=auto'
''; '';
zshConfigLastInit = lib.mkOrder 1500 ''
# Always color ls and group directories
alias ls='ls --color=auto'
'';
in
lib.mkMerge [
zshConfigEarlyInit
zshConfigLastInit
];
}; };
git = { git = {