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

Error installing Nix in Mac with FileVaut encrypted volumes #93

Closed
pupoxcu opened this issue Jun 5, 2020 · 11 comments
Closed

Error installing Nix in Mac with FileVaut encrypted volumes #93

pupoxcu opened this issue Jun 5, 2020 · 11 comments
Labels

Comments

@pupoxcu
Copy link

pupoxcu commented Jun 5, 2020

Following the install guide executed: sh <(curl https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume then it returned: error: refusing to create Nix store volume because the boot volume is FileVault encrypted, but encryption-at-rest is not available. Manually create a volume for the store and re-run this script. See https://nixos.org/nix/manual/#sect-macos-installation

@mpscholten
Copy link
Member

What macbook version are you using?

Can you try these steps (take from NixOS/nix#2925 (comment)):

sudo mkdir /System/Volumes/Data/opt/nix
sudo chown {your_user} /System/Volumes/Data/opt/nix
sudo sh -c "echo 'nix\tSystem/Volumes/Data/opt/nix' >> /etc/synthetic.conf"

Reboot mac. Then:

export NIX_IGNORE_SYMLINK_STORE=1
curl https://nixos.org/nix/install | sh     

After that, add the following to ~/.zprofile:

. ~/.nix-profile/etc/profile.d/nix.sh
export NIX_IGNORE_SYMLINK_STORE=1

I've just tried these steps on a clean 2018 macbook pro (where the above nix installation error message also appeared), and this fixed the problem.

@ajkovar
Copy link

ajkovar commented Jul 15, 2020

This didn't work for me as is. I had to add the -L argument to curl. I guess the page moved? 🤷‍♂️

export NIX_IGNORE_SYMLINK_STORE=1
curl -L https://nixos.org/nix/install | sh    

@jantebeest
Copy link

Doesn't work on MacOS 11, the check looks to be insufficient as it tells me to upgrade to 10.x

@mpscholten
Copy link
Member

What commands/approach did you try? And what's the error message?

@jantebeest
Copy link

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100  2490  100  2490    0     0    771      0  0:00:03  0:00:03 --:--:--   771
downloading Nix 2.3.7 binary tarball for x86_64-darwin from 'https://releases.nixos.org/nix/nix-2.3.7/nix-2.3.7-x86_64-darwin.tar.xz' to '/var/folders/ww/szc9b_qj073659xpp7p8mcbc0000gn/T/nix-binary-tarball-unpack.XXXXXXXXXX.ZstpgXxM'...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 26.4M  100 26.4M    0     0  5903k      0  0:00:04  0:00:04 --:--:-- 6373k
/var/folders/ww/szc9b_qj073659xpp7p8mcbc0000gn/T/nix-binary-tarball-unpack.XXXXXXXXXX.ZstpgXxM/unpack/nix-2.3.7-x86_64-darwin/install: macOS 11.0 is not supported, upgrade to 10.12.6 or higher```

@jantebeest
Copy link

11.0 is not supported, upgrade to 10.12.6 lol

@jantebeest
Copy link

Sorry, command got stripped somehow ...
➜ ~ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume

@hk7alone
Copy link

hk7alone commented Sep 4, 2020

N

@damienxy
Copy link

FYI, I didn't try the above solution, but this blog post worked well for me (Macbook Pro 2017 (Pre-T2) Catalina with FileVault).

@mpscholten
Copy link
Member

This issue has been finally fixed by nix. The macos install script has been updated to automatically resolve the problem here.

See NixOS/nix#4289

@abathur
Copy link

abathur commented Apr 30, 2021

Just for completeness/confusion-avoidance, it'll still need to be released (either in 2.4, or backported to 2.3.x) before it'll work for standard installs. There are instructions in the PR head comment for using a test installer generated from it, which may be a tolerable stopgap (but no substitute for squeaking loudly about getting a new release cut? :)

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

No branches or pull requests

7 participants