Nix switch to Determinate isn't working

Following up on Nix on macOS Sequoia - #2 by abathur I uninstalled Download | Nix & NixOS and installed the Nix installer from Determinate Systems.

How ever when I “switch” to my config GitHub - kaihendry/mac-nix: Kai's home-manager, nix-darwin starting config

It doesn’t work like I expect it to. Bash is not setup. My shell doesn’t work. Can someone please tell me where I am going wrong? I am not sure how to get my familiar bash/starship prompt working from here or how to configure the terminal to do so.

/etc/profiles/per-user/ appears empty. Maybe something this is an indicator something is amiss?

I don’t know if this is an issue but you set PATH in home.sessionVariables and in sessionPath - I would move putting go on the path to the sessionPath setting

e.g.

home.sessionPath = [
    "$HOME/bin"
    "$HOME/go/bin"
  ];

It’s not the issue @mark though thanks for replying.

There are a couple of things that I am bewildered by. Nix shell works when:
ln -s /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt is linked.

However when I run nix run nix-darwin -- switch --flake ~/.config/nix-darwin it complains:

The following files have unrecognized content and would be overwritten:

  /etc/ssl/certs/ca-certificates.crt

When I move it or remove it, it then runs, but then /etc/ssl/certs/ca-certificates.crt is left missing and furthermore /etc/profiles/per-user/ is not populated either. I am not sure is this is a GitHub - DeterminateSystems/nix-installer: Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs. or an GitHub - LnL7/nix-darwin: nix modules for darwin issue!

Update: I’ve filed a bug here: /etc/profiles/per-user empty · Issue #1254 · LnL7/nix-darwin · GitHub

It wasn’t a DeterminateSystems/nix-installer issue. It was due to the install/uninstall issue wrt nix-darwin iiuc. The fix for me was removing /etc/static so it could be recreated correctly. I had some /etc/static/etc nonsense going on.

I seem to have the exact same issue!

But i didn’t quite get the fix!

Did you rm -rf /etc/static and then reinstall nix darwin?

Yes @thife455 ! mv to /tmp instead of rm to play safe. Let me know if it worked?

No dice!

It seems that the link to the certs is either malformed or not runnable through the nix cli. Trying to figure out why this would be :frowning:

Fixed it! Just redownloaded the certificate and put it in the static path! i think darwin wasn’t properly validating that the cert was there!

Interestingley enough this was the issue that drew me into this thread, however, mine still hasn’t been fixed! /etc/profiles/per-user continues to be empty ever with nix darwin working!