Need help with broken nix-darwin, home-manager and flake config

For reference here is my config: GitHub - ldangelo/nix

I went down a bit of a rabbit hole here and am hoping someone can guide me in the right direction…

It all started when I was trying to get isync/mbsync to build using sasl. So I added:

 inputs.nixpkgs.isync.override { withCyrusSaslXoauth2 = true; }

Then did a rebuild, nothing changed, so I searched on how too force isync to rebuild to no avail… I eventually decided to switch too the stable branch of Nixpkgs and now my build is ‘broken’. When I do a:

darwin-rebuild switch --flake .#ldangelo --show-trace --verbose

I get the following output:

darwin-rebuild switch --flake .#ldangelo --show-trace --verbose
warning: input ‘flake-parts’ has an override for a non-existent input ‘nixpkgs’
warning: input ‘nur’ has an override for a non-existent input ‘nixpkgs’
building the system configuration…
warning: input ‘flake-parts’ has an override for a non-existent input ‘nixpkgs’
warning: input ‘nur’ has an override for a non-existent input ‘nixpkgs’
these 29 derivations will be built:
/nix/store/7nh9y70w251mwxn1v4wg96740kv9k8vj-emacs-mac-macport-28.2.drv
/nix/store/c6wwf612j79kb98hsxlvv6mvxqplrhz4-emacs-let-alist-1.0.6.drv
/nix/store/kh1j3h1qvs0cmp4b5cadjjbi82606c67-emacs-tablist-20231019.1126.drv
/nix/store/737xz336y9h2h49dirpav2kck2arpx1y-emacs-pdf-tools-20230611.239.drv
/nix/store/ch7bjym37mvplfnrgv007bbxjf74a3dq-emacs-vterm-20230417.424.drv
/nix/store/qabmw0f6jhnvx3x6ap3yr174jmwkfanz-emacs-xref-1.6.3.drv
/nix/store/qdxwlnxjlxbc340rwl4zdvx91bm60s3s-emacs-project-0.10.0.drv
/nix/store/s1ma9xblzvyj75g3jvrlcbmqix7czhxi-emacs-multi-vterm-20221031.610.drv
/nix/store/y42fw2xnan3741yh0i8f1ncw8pa2frss-emacs-mu4e-1.10.8.drv
/nix/store/fpscai5n4v7jncxswp5n0cys9vb66krx-emacs-packages-deps.drv
/nix/store/s83qqr7dmqn9lbh9kh982pk48pnwfl1g-emacs-mac-macport-with-packages-28.2.drv
/nix/store/cmniv451ygg4db2rrfmrb1akvhfkiakn-emacs-packages-deps.drv
/nix/store/2a4wmvs9hakc3df62826x1jzdk17b4fs-emacs-mac-macport-with-packages-with-packages-28.2.drv
/nix/store/2l3jj258xnr77ldia08pdq39wvghz1xp-wordnet-3.0.drv
/nix/store/gh53vdb8wm98f08nqj21qkzi3p89rjcw-nerdfonts-3.0.2.drv
/nix/store/5c9c152c8dj548xgncx77qjpxkqf04ns-aspell-0.60.8.drv
/nix/store/kdjarcp6y3abl5l1dw7vxwiyiy12vw3b-aspell-env.drv
/nix/store/53f7vhb02gbrs7yx7xf9lwlyn5b9v87c-home-manager-applications.drv
/nix/store/ilb0gjkdyl64yqb6ksx3pgh7x5jh0hiv-home-manager-path.drv
/nix/store/n9p4k39szbkc57602vbfs2d7ac4d6jql-user-environment.drv
/nix/store/5xhi0y2dy9i721qhcg4y85jv31arppdn-etc.drv
/nix/store/7nckl4cqmmfzxs4ikq5f9v36sr7x32gs-hm_fontconfigconf.d10hmfonts.conf.drv
/nix/store/jqsgjigmwbs3x1mszgp8h3hqcyprb4gk-darwin-version.json.drv
/nix/store/h52cpwai05krhwly6g3pk5hjxwjcaiix-home-manager-files.drv
/nix/store/hxya2rhk3qhh1bs8w5d8f567fgbxia7g-home-manager-fonts.drv
/nix/store/yr50qabrnfmqab79fxzhv30x5y9rd1k0-activation-script.drv
/nix/store/cfh0i17dm667izbcsbziiyhaq5qbb3m3-home-manager-generation.drv
/nix/store/sirpx3pghzzxbsyrbfx2zg8xkbd1m95p-activation-ldangelo.drv
/nix/store/a4avg7hzmz2y9wz4k73ahlbhiavvjwm1-darwin-system-23.11.20240516.9574253+darwin4.de8b0d6.drv
building ‘/nix/store/jqsgjigmwbs3x1mszgp8h3hqcyprb4gk-darwin-version.json.drv’…
building ‘/nix/store/gh53vdb8wm98f08nqj21qkzi3p89rjcw-nerdfonts-3.0.2.drv’…
building ‘/nix/store/2l3jj258xnr77ldia08pdq39wvghz1xp-wordnet-3.0.drv’…
building ‘/nix/store/5c9c152c8dj548xgncx77qjpxkqf04ns-aspell-0.60.8.drv’…
building ‘/nix/store/7nh9y70w251mwxn1v4wg96740kv9k8vj-emacs-mac-macport-28.2.drv’…
error: builder for ‘/nix/store/2l3jj258xnr77ldia08pdq39wvghz1xp-wordnet-3.0.drv’ failed with exit code 2;
last 10 log lines:
> wn.c:347:21: note: treat the string as an argument to avoid this
> fprintf(stderr, msg);
> ^
> “%s”,
> 4 warnings and 1 error generated.
> make[2]: *** [Makefile:305: wn-wn.o] Error 1
> make[2]: Leaving directory ‘/private/tmp/nix-build-wordnet-3.0.drv-0/WordNet-3.0/src’
> make[1]: *** [Makefile:218: all-recursive] Error 1
> make[1]: Leaving directory ‘/private/tmp/nix-build-wordnet-3.0.drv-0/WordNet-3.0’
> make: *** [Makefile:156: all] Error 2
For full logs, run ‘nix log /nix/store/2l3jj258xnr77ldia08pdq39wvghz1xp-wordnet-3.0.drv’.
error (ignored): error: cannot unlink ‘/private/tmp/nix-build-aspell-0.60.8.drv-1/aspell-0.60.8’: Directory not empty
error (ignored): error: cannot unlink ‘/private/tmp/nix-build-nerdfonts-3.0.2.drv-4’: Directory not empty
error (ignored): error: cannot unlink ‘/private/tmp/nix-build-emacs-mac-macport-28.2.drv-4/source’: Directory not empty
error: 1 dependencies of derivation ‘/nix/store/53f7vhb02gbrs7yx7xf9lwlyn5b9v87c-home-manager-applications.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/hxya2rhk3qhh1bs8w5d8f567fgbxia7g-home-manager-fonts.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/ilb0gjkdyl64yqb6ksx3pgh7x5jh0hiv-home-manager-path.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/cfh0i17dm667izbcsbziiyhaq5qbb3m3-home-manager-generation.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/n9p4k39szbkc57602vbfs2d7ac4d6jql-user-environment.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/sirpx3pghzzxbsyrbfx2zg8xkbd1m95p-activation-ldangelo.drv’ failed to build
error: 1 dependencies of derivation ‘/nix/store/a4avg7hzmz2y9wz4k73ahlbhiavvjwm1-darwin-system-23.11.20240516.9574253+darwin4.de8b0d6.drv’ failed to build

Anyone have any advice for me?

Thank you in advance,

-LeoD

Seem to have resolved this issue with the following steps (no idea why this worked)f…

sudo nix profile wipe-history --profile /nix/var/nix/profiles/system --older-than 7d

nix-collect-garbage --delete-older-than 14d

nix flake update