Skip to content

bug: Upgrading from 24.11 to 25.11 completely broke zsh and shell on mac #8346

@Locbac

Description

@Locbac

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

There seems to be a bug in home-manager, you can see on my repo: https://github.com/Locbac/nix/
What's happening is that I was on version 24.11 for everything previously. I changed the flake to 25.11 and my server inspiron updated without problems. However on my mac, I'm using home-manager as a module with my nix flake. Currently, absolutely nothing for my zsh works. No aliases, none of my prompt config or anything.
Home-manager now creates a file called .zshenv in my home resulting in:

/Users/amon/.zshenv:1: job table full or recursion limit exceeded
amon@Amons-Mac:~/ > bat .zshenv
─────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────
     │ File: .zshenv
─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ source /Users/amon/.zshenv
─────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────
amon@Amons-Mac:~/ > ls -alh
total 1472
drwxr-x---+ 121 amon  staff   3,8K déc.  14 18:09 .
drwxr-xr-x    7 root  admin   224B août  26 13:44 ..
lrwxr-xr-x@   1 amon  staff    78B déc.  14 17:58 .aerospace.toml -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.aerospace.toml
....
-rw-------@   1 amon  staff   2,2K déc.  14 17:46 .bash_history
-rw-r--r--@   1 amon  staff   116B févr.  1  2025 .bashrc
.....
lrwxr-xr-x@   1 amon  staff    71B déc.  14 17:58 .emacs.d -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.emacs.d
drwxr-xr-x@  28 amon  staff   896B mars  19  2025 .emacs.d.hmbackup
......
lrwxr-xr-x@   1 amon  staff    73B déc.  14 17:58 .ideavimrc -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.ideavimrc
-rw-r--r--@   1 amon  staff   1,0K sept. 27  2024 .ideavimrc.hmbackup
.....
-rw-r--r--@   1 amon  staff    88B déc.  14 17:41 .nix-channels
drwxr-xr-x@   4 amon  staff   128B déc.  14 17:41 .nix-defexpr
lrwxr-xr-x@   1 amon  staff    45B mars   5  2025 .nix-profile -> /Users/amon/.local/state/nix/profiles/profile
.....
lrwxr-xr-x@   1 amon  staff    72B déc.  14 17:58 .p10k.zsh -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.p10k.zsh
.....
lrwxr-xr-x@   1 amon  staff    73B déc.  14 17:58 .spacemacs -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.spacemacs
....
drwx------@   5 amon  staff   160B févr. 11  2025 .zcompcache
-rw-r--r--@   1 amon  staff    72K déc.  14 12:26 .zcompdump
-rw-r--r--@   1 amon  staff    48K juin  27 06:50 .zcompdump.Amons-Mac.local.14851
-rw-r--r--@   1 amon  staff    38K mars  26  2025 .zcompdump.Amons-Mac.local.17295
-rw-r--r--@   1 amon  staff    48K mars  21  2025 .zcompdump.Amons-Mac.local.28379
-rw-r--r--@   1 amon  staff    38K mars   9  2025 .zcompdump.Amons-Mac.local.3678
-rw-r--r--@   1 amon  staff    38K mars  20  2025 .zcompdump.Amons-Mac.local.46707
-rw-r--r--@   1 amon  staff     0B sept.  2 14:52 .zcompdump.Amons-Mac.local.726
-rw-r--r--@   1 amon  staff    47K mars  20  2025 .zcompdump.Amons-Mac.local.82976
-rw-r--r--@   1 amon  staff    49K mars  27  2025 .zcompdump.Amons-Mac.local.9207
-rw-r--r--@   1 amon  staff    50K mars  31  2025 .zcompdump.Amons-Mac.local.94798
-rw-r--r--    1 amon  staff    50K juil. 21 13:22 .zcompdump.Amons-Mac.local.95052
-rw-------@   1 amon  staff    51K déc.  14 18:13 .zsh_history
drwx------   17 amon  staff   544B févr. 14  2025 .zsh_sessions
lrwxr-xr-x@   1 amon  staff    70B déc.  14 17:58 .zshenv -> /nix/store/kiq3av7vbkrgz045i5hdnngnyghb7han-home-manager-files/.zshenv
-rw-r--r--@   1 amon  staff     1B déc.  14 13:00 .zshenv.hmbackup
-rw-r--r--@   1 amon  staff   7,2K mars   5  2025 .zshrc.bak
...
lrwxr-xr-x@   1 amon  staff    17B juil. 30 19:01 lib -> /opt/homebrew/lib
...

I created a manual backup before with .zshrc.bak but I'm unsure why just switching versions resulted in this mess. A lot of the other home manager stuff it works like the other symlinks.
You can see that .bashrc is also nothing related to .zshrc (if somehow home-manager got confused and added it there):

amon@Amons-Mac:~/ > bat .bashrc
─────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────
     │ File: .bashrc
─────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ 
   2 │ export PATH="$PATH:$HOME/.local/bin"
   3 │ 
   4 │ # Added by LM Studio CLI (lms)
   5 │ export PATH="$PATH:/Users/amon/.lmstudio/bin"
─────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────
amon@Amons-Mac:~/ > 

Update

  • I have switched to nushell, and all my aliases and everything seem to work. It's only happening with zsh, nothing else.

Maintainer CC

@khaneliman

System information

amon@Amons-Mac:~/ > nix-shell -p nix-info --run "nix-info -m"
unpacking 'https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/%2A.tar.gz' into the Git cache...
these 2 paths will be fetched (0.01 MiB download, 0.07 MiB unpacked):
  /nix/store/8w3jqx8sqxf5pcxvhwddg7vy6zd97vdj-DarwinTools-1
  /nix/store/vijw5rjhnmvcy4f1h36ipb05vwf3m9lb-nix-info
copying path '/nix/store/8w3jqx8sqxf5pcxvhwddg7vy6zd97vdj-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/vijw5rjhnmvcy4f1h36ipb05vwf3m9lb-nix-info' from 'https://cache.nixos.org'...
 - system: `"aarch64-darwin"`
 - host os: `Darwin 24.6.0, macOS 15.6.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.26.2`
 - nixpkgs: `/nix/store/9rf7z9hhnxqvbf5i04labfsxill2zhyl-source`

amon@Amons-Mac:~/ >

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageIssues or feature request that have not been triaged yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions