From 27fb7195550f73a61efc7d6de71a13ab53426c0d Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 4 Jun 2026 08:49:53 +0200 Subject: [PATCH 1/2] feature(omz): add option to make omz faster on large repositories --- modules/home-manager/shell.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix index 17f3f58..2efd4ac 100644 --- a/modules/home-manager/shell.nix +++ b/modules/home-manager/shell.nix @@ -8,8 +8,11 @@ syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; - # theme will be set below + # theme will be set below depending on the shell theme = ""; + # make omz faster on large repositories + custom = "DISABLE_UNTRACKED_FILES_DIRTY=true"; + # add git and agents as plugins plugins = [ "git" "ssh-agent" "gpg-agent" ]; }; # only display a fancy theme when glyphs are rendered From 2edc62ff130f35280788ac0a8257ae760853bb45 Mon Sep 17 00:00:00 2001 From: aaron Date: Thu, 4 Jun 2026 09:18:33 +0200 Subject: [PATCH 2/2] refactor(omz): move theme selection and untracked files to extraConfig --- modules/home-manager/shell.nix | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/home-manager/shell.nix b/modules/home-manager/shell.nix index 2efd4ac..ad35c12 100644 --- a/modules/home-manager/shell.nix +++ b/modules/home-manager/shell.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, inputs, ... }: - + { # configure z-shell to use omz with some plugins programs.zsh = { @@ -8,21 +8,21 @@ syntaxHighlighting.enable = true; oh-my-zsh = { enable = true; - # theme will be set below depending on the shell - theme = ""; - # make omz faster on large repositories - custom = "DISABLE_UNTRACKED_FILES_DIRTY=true"; # add git and agents as plugins plugins = [ "git" "ssh-agent" "gpg-agent" ]; + # everything here lands before `source $ZSH/oh-my-zsh.sh` + extraConfig = '' + # make omz faster on large repositories + DISABLE_UNTRACKED_FILES_DIRTY=true + + # only display a fancy theme when glyphs are rendered + if [[ "$TERM" == "linux" || "$TERM" == "screen" ]]; then + ZSH_THEME="gentoo" + else + ZSH_THEME="agnoster" + fi + ''; }; - # only display a fancy theme when glyphs are rendered - initContent = lib.mkOrder 550 '' - if [[ "$TERM" == "linux" || "$TERM" == "screen" ]]; then - ZSH_THEME="gentoo" - else - ZSH_THEME="agnoster" - fi - ''; }; # set important env vars