Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nix installation issues #12330

Open
3 of 5 tasks
tomek-kr opened this issue Jan 22, 2025 · 2 comments
Open
3 of 5 tasks

Nix installation issues #12330

tomek-kr opened this issue Jan 22, 2025 · 2 comments

Comments

@tomek-kr
Copy link

Platform

  • Linux:
  • macOS
  • WSL

Additional information

macOS Sequoia 15.2
M1 Apple Silicon
FileVault enabled
Had several attempts to install nix with the goal to use flakes for system setup, but it always ends with the same result.
I'm not a programmer and I'm not very experienced with the terminal.

Output

Output
I am executing:

    $ sudo cp /etc/synthetic.conf /var/folders/zc/q1z682m90wd7_qcw7t4pk6_00000gn/T/tmp.GH8cRx5BYO/synthetic.conf.edit

remove nix from /var/folders/zc/q1z682m90wd7_qcw7t4pk6_00000gn/T/tmp.GH8cRx5BYO/synthetic.conf.edit


~~> Checking for artifacts of previous installs
Before I try to install, I'll check for signs Nix already is or has
been installed on this system.

---- oh no! --------------------------------------------------------------------
I back up shell profile/rc scripts before I add Nix to them.
I need to back up /etc/bash.bashrc to /etc/bash.bashrc.backup-before-nix,
but the latter already exists.

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

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

2. Ensure /etc/bash.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/bash.bashrc is backed up and
   /etc/bash.bashrc.backup-before-nix doesn't mention Nix, run:
   mv /etc/bash.bashrc.backup-before-nix /etc/bash.bashrc

We'd love to help if you need it.

You can open an issue at
https://github.com/NixOS/nix/issues/new?labels=installer&template=installer.md

Or get in touch with the community: https://nixos.org/community

Checklist


Add 👍 to issues you find important.

@cole-h
Copy link
Member

cole-h commented Jan 22, 2025

The error message suggests some steps to try, namely:

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

  2. Ensure /etc/bash.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/bash.bashrc is backed up and
    /etc/bash.bashrc.backup-before-nix doesn't mention Nix, run:
    mv /etc/bash.bashrc.backup-before-nix /etc/bash.bashrc

Could you confirm you followed these instructions, or if following them now allows the install to succeed (or at least get further)?

@abathur
Copy link
Member

abathur commented Jan 23, 2025

Since you say you've tried a few times already, I'd try the full uninstall instructions before reinstalling it: https://nixos.org/manual/nix/stable/installation/uninstall.html#macos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants