Problem with reinstalling Nix / Setting up Nix for Plutus Playground on M1 Mac OS Monterey

Hey! I was trying to setup nix in order to use Plates Playground. In order to work properly I was meant to Edit the /etc/nix/nix.conf file. Since I couldn’t find the file anywhere I decided to try to reinstall nix.

I get the following message after trying to reinstall:
---- oh no! --------------------------------------------------------------------
I back up shell profile/rc scripts before I add Nix to them.
I need to back up /etc/bashrc to /etc/bashrc.backup-before-nix,
but the latter already exists.

Here’s how to clean up the old backup file:

  1. Back up (copy) /etc/bashrc and /etc/bashrc.backup-before-nix
    to another location, just in case.

  2. Ensure /etc/bashrc.backup-before-nix does not have anything
    Nix-related in it. If it does, something is probably quite
    wrong. Please open an issue or get in touch immediately.

  3. Once you confirm /etc/bashrc is backed up and
    /etc/bashrc.backup-before-nix doesn’t mention Nix, run:
    mv /etc/bashrc.backup-before-nix /etc/bashrc

We’d love to help if you need it.

You can open an issue at Issues · NixOS/nix · GitHub

Or feel free to contact the team:

I then tried the following commands:

MacBook-Pro-3:~ dauv$ mv /etc/bashrc.backup-before-nix /etc/bashrc
override r–r–r-- root/wheel for /etc/bashrc? (y/n [n]) y
mv: rename /etc/bashrc.backup-before-nix to /etc/bashrc: Permission denied
MacBook-Pro-3:~ dauv$ nix --version
-bash: nix: command not found
MacBook-Pro-3:~ dauv$ mv /etc/bashrc.backup-before-nix /etc/bashrc
override r–r–r-- root/wheel for /etc/bashrc? (y/n [n]) n
not overwritten

So now I can neither use nix and nor can I reinstall it. (picture attached) I hope somebody can help me since I feel totally lost.

best regards

You need to execute those commands with sudo

I have tried doing that but it doesn’t work somehow.

This is what I get:

MacBook-Pro-3:~ dauv$ sudo mv /etc/zshrc.backup-before-nix /etc/zshrc

MacBook-Pro-3:~ dauv$

MacBook-Pro-3:~ dauv$ mv /etc/zshrc.backup-before-nix /etc/zshrc

mv: /etc/zshrc.backup-before-nix: No such file or directory

MacBook-Pro-3:~ dauv$

Nevermind it now worked after I manually deleted everything nix related.

Now I still face a problem. For Plates to work I need to edit the /etc/nix/nix.conf file. But I can’t find this file. in the Plutus instructions it says that I have to create it but I a unsure on how or where to create that file.