New clean DS Nix with standard config running smoothly on MBP early 2015, no complaint.
Until I noticed a slow zsh prompt after every command - not slow loading zsh.
It takes a sec or 2s to display prompt after any simple command (eg. ls)
This zsh is enabled on the home manager instead on configuration.nix because I wanted to add starlight and I don’t know yet what to do in order to have global zsh outcome eval starship.
Testing command time zsh -i -l -c ':'
still reasonable (?) .52 real 1.66 user 0.66 sys
There is also some activities info on the terminal’s title bar eg. type -p bash64, bash64, tr type, fzf and others so I went on removing packages on the configuration.nix however it don’t seem to matter.
Some info on system:
- system:
"x86_64-darwin"
- host os:
Darwin 24.1.0, macOS 10.16
- multi-user?:
yes
- sandbox:
no
- version:
nix-env (Nix) 2.24.10
- channels(root):
""
- nixpkgs:
/nix/store/rxn26bq4xm2p0x4whkp94afhy1g88cm7-source
It’s a clean early 2015, 8GB RAM and 256GB storage, I did patch it though using OpenCore Legacy to install Sequoia which I don’t think have got anything to do with the issue but worth mentioning.
/etc/shells:
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
# List of shells managed by nix.
/run/current-system/sw/bin/zsh
flake.nix:
{
description = "Worka's macOS Darwin system flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nix-darwin, nixpkgs, home-manager, ... }:
{
# Build darwin flake using:
# $ darwin-rebuild build --flake .#Workas-MacBook-Pro
darwinConfigurations."Workas-MacBook-Pro" = nix-darwin.lib.darwinSystem
{
modules = [
./configuration.nix
home-manager.darwinModules.home-manager
{
# home-manager configuration
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.workambp1 = import ./home.nix;
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."Workas-MacBook-Pro".pkgs;
};
}
configuration.nix:
{ config, lib, pkgs, ... }:
{
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
neovim
git
];
users.users.workambp1.home = "/Users/workambp1";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Font
fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
];
# nix.package = pkgs.nix;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Finder settings
system.defaults.finder = {
ShowPathbar = true;
};
# Dock settings
system.defaults.dock = {
autohide = true;
show-recents = false;
tilesize = 50;
magnification = true;
largesize = 64;
orientation = "bottom";
mineffect = "scale";
launchanim = false;
};
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 5;
nix.configureBuildUsers = true;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "x86_64-darwin";
}
home.nix:
{ pkgs, lib, config, ... }:
{
home.packages = with pkgs; [
tree
];
home.stateVersion = "24.05";
# home-manager enable
programs.home-manager.enable = true;
# ZSH additional config
# SOURCE OF SLOWNESS - might want to check init
programs.zsh = {
enable = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
# Trying wezterm
programs.wezterm = {
enable = true;
extraConfig = ''
-- local wezterm = require 'wezterm' <- already added to /Users/workambp1/.config/wezterm/wezterm.lua by hm
return {
cursor_blink_rate = 800,
color_scheme = "Dracula (Official)",
tab_bar_at_bottom = true,
window_decorations = "RESIZE",
front_end = "WebGpu",
window_background_opacity = 0.9,
macos_window_background_blur = 10,
-- Set font to JetBrains Mono
font = wezterm.font("JetBrainsMono Nerd Font"),
}
'';
};
# Trying Starship
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
add_newline = false;
};
};
# Eza
programs.eza = {
enable = false;
icons = "auto";
enableZshIntegration = false;
};
}
Anyone ever experience this issue? Any thoughts?
TIA