From ea5fbc63cf347f4b05fb6fba842dbf9d8d215f87 Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 21 Dec 2022 14:13:20 +0000 Subject: [PATCH] zsh/p10k: selectively disable gitstatus acceleration on ~/private/ --- modules/home-manager/zsh/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/zsh/default.nix b/modules/home-manager/zsh/default.nix index e7f15998..4dd3eda2 100644 --- a/modules/home-manager/zsh/default.nix +++ b/modules/home-manager/zsh/default.nix @@ -17,7 +17,18 @@ lib.mkIf config.sane.home-manager.enable # defaultKeymap = "vicmd"; # vim normal mode (cmd mode) # powerlevel10k prompt config - initExtraBeforeCompInit = builtins.readFile ./p10k.zsh; + initExtraBeforeCompInit = (builtins.readFile ./p10k.zsh) + '' + # powerlevel10k launches a gitstatusd daemon to accelerate git prompt queries. + # this keeps open file handles for any git repo i touch for 60 minutes (by default). + # that prevents unmounting whatever device the git repo is on -- particularly problematic for ~/private. + # i can disable gitstatusd and get slower fallback git queries: + # - either universally + # - or selectively by path + # see: + typeset -g POWERLEVEL9K_VCS_DISABLED_DIR_PATTERN='(/home/colin/private/*|/home/colin/knowledge/*)' + # typeset -g POWERLEVEL9K_DISABLE_GITSTATUS=true + ''; + initExtra = '' # zmv is a way to do rich moves/renames, with pattern matching/substitution. # see for an example: