Coder Social home page Coder Social logo

Comments (8)

kriswill avatar kriswill commented on September 26, 2024 1

@Hoverbear I previously had v0.15.1 installed, along with nix-darwin. The procedure was:

  1. install nix-installer at v0.15.1
  2. install nix-darwin (around early December)
  3. uninstall nix-darwin (today). I had seen the /etc/bashrc and /etc/zshrc symlink errors, presumably after a macOS update.
  4. uninstall determinant nix installer v0.15.1
  5. install nix-installer v0.16.0
  6. error posted above.

My theory is that there is some remnant of the previous installation that is causing issues for the installer. From what I understand there was some conflict between nix-darwin and it's handling the /etc/{ba,z}shrc files. I found this unresolved issue, that might have something to do with what I'm seeing. LnL7/nix-darwin#730.

I located these backup files here:

ls /etc/{ba,z}shrc*                                                                                                       
bashrc				bashrc_Apple_Terminal		zshrc.before-nix-darwin
bashrc.before-nix-darwin	zshrc				zshrc_Apple_Terminal

however the backup files are showing the # Nix sections in them, so I will try to restore these, and see if the nix-installer will work.

EDIT:
yeah, after restoring the shell files, no dice it's still failing to install, with the same error above.

Let me know if there is a more robust logging diag I can perform to get better information for you!

terminal session output

UPDATE 2:
It is also failing to install at v0.15.1.

UPDATE 3:

SUCCESS, I was able to get it installed! there were a number of files in my home directory, that were apparently causing the issues. specifically:

  • ~/.local/nix
  • ~/.nix-profile
  • ~/.nix-expr
  • ~/.cache/nix

from nix-installer.

Hoverbear avatar Hoverbear commented on September 26, 2024

Could you give me a better idea how to reproduce this?

From a clean install:

% ./nix-installer install
`nix-installer` needs to run as `root`, attempting to escalate now via `sudo`...
Nix install plan (v0.16.0)
Planner: macos (with default settings)

Planned actions:
* Create an APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
* Fetch `https://releases.nixos.org/nix/nix-2.19.2/nix-2.19.2-aarch64-darwin.tar.xz` to `/nix/temp-install-dir`
* Create a directory tree in `/nix`
* Move the downloaded Nix into `/nix`
* Create build users (UID 301-332) and group (GID 30000)
* Configure Time Machine exclusions
* Setup the default Nix profile
* Place the Nix configuration in `/etc/nix/nix.conf`
* Configure the shell profiles
* Configuring zsh to support using Nix in non-interactive shells
* Create a `launchctl` plist to put Nix into your PATH
* Configure Nix daemon related settings with launchctl
* Remove directory `/nix/temp-install-dir`


Proceed? ([Y]es/[n]o/[e]xplain): y
 INFO Step: Create an APFS volume `Nix Store` for Nix on `disk3` and add it to `/etc/fstab` mounting on `/nix`
 INFO Step: Provision Nix
 INFO Step: Create build users (UID 301-332) and group (GID 30000)
 INFO Step: Configure Time Machine exclusions
 INFO Step: Configure Nix
 INFO Step: Configuring zsh to support using Nix in non-interactive shells
 INFO Step: Create a `launchctl` plist to put Nix into your PATH
 INFO Step: Configure Nix daemon related settings with launchctl
 INFO Step: Remove directory `/nix/temp-install-dir`
Nix was installed successfully!
To get started using Nix, open a new shell or run `. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh`

% sw_vers
ProductName:            macOS
ProductVersion:         14.2.1
BuildVersion:           23C71

from nix-installer.

stroborobo avatar stroborobo commented on September 26, 2024

Also /etc/nix (for me at least – the nix.conf.before-nix-darwin file was keeping it alive I guess)

Additionally I removed the fstab entry for /nix manually, as well as the org.nixos.nix-daemon service (launchctl bootout system/org.nixos.nix-daemon && rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist ). No idea if it would've been required, I just happened to stumble over the remains.

from nix-installer.

Hoverbear avatar Hoverbear commented on September 26, 2024

I'm really glad you got it! It seems we may have some bug, doing as you described should work.

from nix-installer.

Hoverbear avatar Hoverbear commented on September 26, 2024

Do you think you could confirm with me if you had filevault enabled?

from nix-installer.

stroborobo avatar stroborobo commented on September 26, 2024

On my machines it is. APFS is encrypted by default, "enabling" FileVault just adds a user part to the encryption key.
https://support.apple.com/guide/security/volume-encryption-with-filevault-sec4c6dc1b6e/web

No idea if it matters at all, but just in case..

from nix-installer.

kriswill avatar kriswill commented on September 26, 2024

Do you think you could confirm with me if you had filevault enabled?

image

It's so happens that this Mac was provided by my work, and they have clamped down on enforcing some of their security measures, such as locking in FileVault.

from nix-installer.

Hoverbear avatar Hoverbear commented on September 26, 2024

I've spent some time trying to reproduce this now for several days and haven't had luck. If anyone gets more information it'd be helpful if it was shared!

from nix-installer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.