summary refs log tree commit diff stats
path: root/system/settings
diff options
context:
space:
mode:
authorAlan Pearce2023-08-09 17:16:20 +0200
committerAlan Pearce2023-08-09 19:22:26 +0200
commitb9ad3d7604a9b7517483c47a6c991dde6d1156fb (patch)
tree5a85b210579d3a9590cb3c12e4bfe7f8b452c973 /system/settings
parent1ce8a9560ed3d061b3106feea786d0132988e47c (diff)
downloadnixfiles-b9ad3d7604a9b7517483c47a6c991dde6d1156fb.tar.lz
nixfiles-b9ad3d7604a9b7517483c47a6c991dde6d1156fb.tar.zst
nixfiles-b9ad3d7604a9b7517483c47a6c991dde6d1156fb.zip
shell: disable compinit in one place across platforms
Diffstat (limited to 'system/settings')
-rw-r--r--system/settings/darwin.nix2
-rw-r--r--system/settings/programs/shell.nix7
2 files changed, 5 insertions, 4 deletions
diff --git a/system/settings/darwin.nix b/system/settings/darwin.nix
index 6b6f3aae..ac5dbf15 100644
--- a/system/settings/darwin.nix
+++ b/system/settings/darwin.nix
@@ -28,8 +28,6 @@
 
   programs.zsh = {
     enable = true;
-    enableCompletion = false; # Causes >2s startup time, overlaps home-manager config
-    enableBashCompletion = true;
     loginShellInit = ''
       source /System/Library/Templates/Data/private/etc/zprofile
     '';
diff --git a/system/settings/programs/shell.nix b/system/settings/programs/shell.nix
index c0e50690..62d51230 100644
--- a/system/settings/programs/shell.nix
+++ b/system/settings/programs/shell.nix
@@ -8,9 +8,12 @@
       promptInit = "";
     }
     // (
+      # Either of these will call `compinit`, causing >2s startup time
+      # Do it in home-manager instead
       if pkgs.stdenv.isDarwin
-      then { }
-      else {
+      then {
+        enableCompletion = false;
+      } else {
         enableGlobalCompInit = false;
       }
     );