NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.83k stars 1.52k forks source link

install: /etc/nix/nix.conf: No such file or directory #6327

Closed hedefalk closed 1 year ago

hedefalk commented 2 years ago

Trying a re-install on Mac

sh (curl -L https://nixos.org/nix/install | psub)

Failing on:

✗ sudo install -m 0664 /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.wPT5su7Z4a/nix.conf /etc/nix/nix.conf
install: /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.wPT5su7Z4a/nix.conf: No such file or directory
Full log: ``` viktor@antonida> sh <(curl -L https://nixos.org/nix/install) ~/dev/projects/dotfiles % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 4046 100 4046 0 0 15743 0 --:--:-- --:--:-- --:--:-- 15743 downloading Nix 2.7.0 binary tarball for x86_64-darwin from 'https://releases.nixos.org/nix/nix-2.7.0/nix-2.7.0-x86_64-darwin.tar.xz' to '/var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/nix-binary-tarball-unpack.XXXXXXXXXX.x0M71Tip'... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 23.2M 100 23.2M 0 0 16.7M 0 0:00:01 0:00:01 --:--:-- 16.7M Switching to the Multi-user Installer Welcome to the Multi-User Nix Installation This installation tool will set up your computer with the Nix package manager. This will happen in a few stages: 1. Make sure your computer doesn't already have Nix. If it does, I will show you instructions on how to clean up your old install. 2. Show you what I am going to install and where. Then I will ask if you are ready to continue. 3. Create the system users and groups that the Nix daemon uses to run builds. 4. Perform the basic installation of the Nix files daemon. 5. Configure your shell to import special Nix Profile files, so you can use Nix. 6. Start the Nix daemon. Would you like to see a more detailed list of what I will do? [y/n] y I will: - make sure your computer doesn't already have Nix files (if it does, I will tell you how to clean them up.) - create local users (see the list above for the users I'll make) - create a local group (nixbld) - install Nix in to /nix - create a configuration file in /etc/nix - set up the "default profile" by creating some Nix-related files in /var/root - back up /etc/bashrc to /etc/bashrc.backup-before-nix - update /etc/bashrc to include some Nix configuration - back up /etc/zshrc to /etc/zshrc.backup-before-nix - update /etc/zshrc to include some Nix configuration - create a Nix volume and a LaunchDaemon to mount it - create a LaunchDaemon (at /Library/LaunchDaemons/org.nixos.nix-daemon.plist) for nix-daemon Ready to continue? [y/n] y ---- let's talk about sudo ----------------------------------------------------- This script is going to call sudo a lot. Every time I do, it'll output exactly what it'll do, and why. Just like this: ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo echo to demonstrate how our sudo prompts look This might look scary, but everything can be undone by running just a few commands. I used to ask you to confirm each time sudo ran, but it was too many times. Instead, I'll just ask you this one time: Can I use sudo? [y/n] y Yay! Thanks! Let's get going! ~~> Fixing any leftover Nix volume state Before I try to install, I'll check for any existing Nix volume config and ask for your permission to remove it (so that the installer can start fresh). I'll also ask for permission to fix any issues I spot. During install, I add 'nix' to /etc/synthetic.conf, which instructs macOS to create an empty root directory for mounting the Nix volume. Nix isn't the only thing in /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno/synthetic.conf.edit, but I think I know how to edit it out. Here's the diff: + nix run private/var/run Does the change above look right? [y/n] y ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo cp /etc/synthetic.conf /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno/synthetic.conf.edit remove nix from /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno/synthetic.conf.edit Password: During install, I add '/nix' to /etc/fstab so that macOS knows what mount options to use for the Nix volume. Can I remove /etc/fstab? [y/n] y ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo rm /etc/fstab to remove /etc/fstab ~~> 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. ---- warning! ------------------------------------------------------------------ Nix already appears to be installed. This installer may run into issues. If an error occurs, try manually uninstalling, then rerunning this script. Uninstalling nix: 1. Delete the files Nix added to your system: sudo rm -rf /etc/nix /nix /var/root/.nix-profile /var/root/.nix-defexpr /var/root/.nix-channels /Users/viktor/.nix-profile /Users/viktor/.nix-defexpr /Users/viktor/.nix-channels and that is it. ---- Nix config report --------------------------------------------------------- Temp Dir: /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno Nix Root: /nix Build Users: 32 Build Group ID: 30000 Build Group Name: nixbld build users: Username: UID _nixbld1: 301 _nixbld2: 302 _nixbld3: 303 _nixbld4: 304 _nixbld5: 305 _nixbld6: 306 _nixbld7: 307 _nixbld8: 308 _nixbld9: 309 _nixbld10: 310 _nixbld11: 311 _nixbld12: 312 _nixbld13: 313 _nixbld14: 314 _nixbld15: 315 _nixbld16: 316 _nixbld17: 317 _nixbld18: 318 _nixbld19: 319 _nixbld20: 320 _nixbld21: 321 _nixbld22: 322 _nixbld23: 323 _nixbld24: 324 _nixbld25: 325 _nixbld26: 326 _nixbld27: 327 _nixbld28: 328 _nixbld29: 329 _nixbld30: 330 _nixbld31: 331 _nixbld32: 332 Ready to continue? [y/n] y ---- Preparing a Nix volume ---------------------------------------------------- Nix traditionally stores its data in the root directory /nix, but macOS now (starting in 10.15 Catalina) has a read-only root directory. To support Nix, I will create a volume and configure macOS to mount it at /nix. ~~> Creating a Nix volume ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/diskutil apfs addVolume disk2 APFS Nix Store -nomount to create a new APFS volume 'Nix Store' on disk2 ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/diskutil unmount force disk2s8 to ensure the Nix volume is not mounted disk2s8 was already unmounted ~~> Configuring /etc/fstab to specify volume mount options ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/vifs to add nix to fstab ~~> Encrypt the Nix volume ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/diskutil mount Nix Store to mount your Nix volume for encrypting Volume Nix Store on Nix Store mounted ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/security -i to add your Nix volume's password to Keychain ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/diskutil apfs encryptVolume Nix Store -user disk -stdinpassphrase to actually encrypt your Nix volume Starting background encryption with the new "Disk" crypto user on disk2s8 The new "Disk" user will be the only one who has initial access to disk2s8 The new APFS crypto user UUID will be 5E15C964-7EEE-4C2A-B11A-50334A47B4C7 Background encryption is ongoing; see "diskutil apfs list" to see progress ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/diskutil unmount force Nix Store to unmount the encrypted volume Volume Nix Store on disk2s8 force-unmounted ~~> Configuring LaunchDaemon to mount 'Nix Store' ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/ex --noplugin /Library/LaunchDaemons/org.nixos.darwin-store.plist to install the Nix volume mounter ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo launchctl bootstrap system /Library/LaunchDaemons/org.nixos.darwin-store.plist to launch the Nix volume mounter ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo launchctl kickstart -k system/org.nixos.darwin-store to launch the Nix volume mounter ~~> Setting up the build group nixbld Exists: Yes ~~> Setting up the build user _nixbld1 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 1 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld1 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld2 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 2 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld2 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld3 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 3 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld3 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld4 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 4 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld4 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld5 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 5 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld5 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld6 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 6 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld6 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld7 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 7 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld7 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld8 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 8 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld8 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld9 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 9 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld9 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld10 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 10 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld10 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld11 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 11 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld11 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld12 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 12 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld12 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld13 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 13 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld13 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld14 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 14 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld14 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld15 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 15 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld15 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld16 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 16 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld16 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld17 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 17 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld17 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld18 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 18 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld18 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld19 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 19 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld19 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld20 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 20 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld20 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld21 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 21 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld21 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld22 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 22 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld22 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld23 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 23 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld23 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld24 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 24 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld24 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld25 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 25 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld25 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld26 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 26 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld26 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld27 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 27 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld27 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld28 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 28 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld28 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld29 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 29 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld29 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld30 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 30 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld30 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld31 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 31 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld31 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the build user _nixbld32 Exists: Yes Hidden: Yes Home Directory: /var/empty Note: Nix build user 32 Logins Disabled: Yes Member of nixbld: Yes ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/bin/dscl . -create /Users/_nixbld32 PrimaryGroupID 30000 to let the nix daemon use this user for builds (this might seem redundant, but there are two concepts of group membership) PrimaryGroupID: 30000 ~~> Setting up the basic directory structure ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /usr/sbin/chown -R root:nixbld /nix to take root ownership of existing Nix store files ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo install -dv -m 0755 /nix /nix/var /nix/var/log /nix/var/log/nix /nix/var/log/nix/drvs /nix/var/nix /nix/var/nix/db /nix/var/nix/gcroots /nix/var/nix/profiles /nix/var/nix/temproots /nix/var/nix/userpool /nix/var/nix/daemon-socket /nix/var/nix/gcroots/per-user /nix/var/nix/profiles/per-user to make the basic directory structure of Nix (part 1) install: mkdir /nix/var install: mkdir /nix/var/log install: mkdir /nix/var/log/nix install: mkdir /nix/var/log/nix/drvs install: mkdir /nix/var/nix install: mkdir /nix/var/nix/db install: mkdir /nix/var/nix/gcroots install: mkdir /nix/var/nix/profiles install: mkdir /nix/var/nix/temproots install: mkdir /nix/var/nix/userpool install: mkdir /nix/var/nix/daemon-socket install: mkdir /nix/var/nix/gcroots/per-user install: mkdir /nix/var/nix/profiles/per-user ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo install -dv -g nixbld -m 1775 /nix/store to make the basic directory structure of Nix (part 2) install: mkdir /nix/store ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo install -dv -m 0555 /etc/nix to place the default nix daemon configuration (part 1) ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo install -m 0664 /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno/.nix-channels /var/root/.nix-channels to set up the default system channel (part 1) ~~> Installing Nix ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo cp -RLp ./store/015rgxn5xx5awkz48yhh9c9n1bsvvivm-libiconv-50 ./store/0cgmjzpv8xy2ll3z1wwpnj5js58ddp07-libcxx-7.1.0 ./store/0ma0hl096m764z10k1lp5fwvl7pzm16a-boehm-gc-8.0.4 ./store/0qkfjbhpq6v36rdy8j5arnxdrapv3i3m-libkrb5-1.18 ./store/1j82hjxc28ccvi8i4f3zqg8gia3zvcnp-openssl-1.1.1l ./store/2p623hvx2ha2clb6ry2cyyd0jdz0qyd8-aws-c-cal-0.4.5 ./store/3saax6q1s9im5p80nxhdqpjmw3g4nzg8-curl-7.76.1 ./store/4hdh249mvpywd9qka6awibgdils1mf2a-libcpuid-0.5.1 ./store/5l22hgwshwq7sqn7wqdxmpq1q2100br8-libarchive-3.5.2-lib ./store/5py10pm1w9ziv4qgsk80ghqxwf51syv1-brotli-1.0.9-lib ./store/69dskd4cabzl6cxch5lbfss73l3r6bya-apple-framework-Security ./store/6p1mr7avpnni6n7ssxqjfj7fa4sy00x0-openssl-1.1.1l ./store/79q6vp06aj2p550f2wgn9zywywm6pmir-libcxxabi-7.1.0 ./store/80lzb3092v637di7ihbwx888isy1w1li-libssh2-1.9.0 ./store/8vdyi0ifc098g6cnw38pqbwi78drkgj0-aws-sdk-cpp-1.8.121 ./store/95n0y1033piss1slf99is61a3zc0yv0p-libsodium-1.0.18 ./store/9lzf8irh5b0v9vix6j847vyhqp5lxwq6-aws-checksums-0.1.11 ./store/afpdl5r9jnb8bx42nzpqi0c6g1flwldg-Libsystem-1238.60.2 ./store/bvaaggjpcf66xka2qfbnly2j3qqq7hpy-nlohmann_json-3.9.1 ./store/cpgyi9khbv1yg2i22vg0zhmsnif9aih9-bash-4.4-p23 ./store/d0dxz2ysp7xd49l8w2n738pps2k3d7m9-aws-c-io-0.9.1 ./store/g8fbhc5bn0mi29gw3jhxm4hrlif00nlz-brotli-1.0.9-lib ./store/gb9nkla1b2zplgbn7j01q7l8hswgwcnb-xz-5.2.5 ./store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0 ./store/i0zac1vw0ra6g2mg701m3kc9xbi24lgg-zlib-1.2.11 ./store/i8rksi0pqzcbmsfs48kwp5nvih8mfn4a-bzip2-1.0.6.0.2 ./store/jd1l64vr0b5y1qvdsrminn53gkvamm32-editline-1.17.1 ./store/k5i7ralzb1w0jx3fyn8q9n80kwv16l33-swift-corefoundation ./store/k5vggrdqvyb4lgyy7ck7s7wlyfiqfh9k-sqlite-3.35.5 ./store/k7vg16vz0dsxjfxv0a2hkxw7y4msv7la-zstd-1.4.9 ./store/kldmyqpq68qqp5y80fa0y66zlfzalm7m-aws-c-event-stream-0.2.7 ./store/kvcxphxg6pwp9wgvb468l5m5sbd5krrs-aws-c-common-0.5.5 ./store/kvvpk2vdlh4pc8qyfxcd1rlzyr4zb3bp-libssh2-1.9.0 ./store/n2a3hyr6kmadwpivr0x36xylj9j0wcja-curl-7.76.1 ./store/nqfyfv5lq0n00iqakzcpbl5cq2dkwdz8-libxml2-2.9.12 ./store/r0023xa974x14h83jwrcc8x6i54n9b78-libxml2-2.9.12 ./store/s3dhqrdq6mj935q2pfgw373w0n8459m1-apple-framework-IOKit ./store/wil7lqvyfb18hkdv0bdrf5h0f9y5v9lm-ICU-66108 ./store/wiqcjg66s7sb6cais8pifrk3l9cpkrmq-nss-cacert-3.66 ./store/x0r180c6xm8zgfnczhi27831ly56k888-nghttp2-1.43.0-lib ./store/z31hmk06a669vhjaj6ahn5x2i73l2bsy-libkrb5-1.18 ./store/zqigm4h2qjj8pr6z47aj4zf3rasrb6fy-nghttp2-1.43.0-lib /nix/store/ to copy the basic Nix files to the new store at /nix/store ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo chmod -R ugo-w /nix/store/ to make the new store non-writable at /nix/store Alright! We have our first nix at /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0 ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0/bin/nix-store --load-db to load data for the first time in to the Nix Database Just finished getting the nix database ready. ~~> Setting up shell profiles: /etc/bashrc /etc/profile.d/nix.sh /etc/zshrc /etc/bash.bashrc /etc/zsh/zshrc ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo cp /etc/bashrc /etc/bashrc.backup-before-nix to back up your current /etc/bashrc to /etc/bashrc.backup-before-nix ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo tee -a /etc/bashrc extend your /etc/bashrc with nix-daemon settings # Nix if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' fi # End Nix ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo cp /etc/zshrc /etc/zshrc.backup-before-nix to back up your current /etc/zshrc to /etc/zshrc.backup-before-nix ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo tee -a /etc/zshrc extend your /etc/zshrc with nix-daemon settings # Nix if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' fi # End Nix ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo touch /etc/bash.bashrc to create a stub /etc/bash.bashrc which will be updated ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo tee -a /etc/bash.bashrc extend your /etc/bash.bashrc with nix-daemon settings # Nix if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' fi # End Nix ~~> Setting up the default profile ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo HOME=/var/root /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0/bin/nix-env -i /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0 to install a bootstrapping Nix in to the default profile installing 'nix-2.7.0' building '/nix/store/vl767n4bl7dkh01vzd4c00k5dhm418s5-user-environment.drv'... ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo HOME=/var/root /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0/bin/nix-env -i /nix/store/wiqcjg66s7sb6cais8pifrk3l9cpkrmq-nss-cacert-3.66 to install a bootstrapping SSL certificate just for Nix in to the default profile installing 'nss-cacert-3.66' building '/nix/store/wj1r91455c2k3713l477frwad88sw7q2-user-environment.drv'... ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo HOME=/var/root NIX_SSL_CERT_FILE=/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /nix/store/hyfj5imsd0c4amlcjpf8l6w4q2draaj3-nix-2.7.0/bin/nix-channel --update nixpkgs to update the default channel in the default profile unpacking channels... ---- sudo execution ------------------------------------------------------------ I am executing: $ sudo install -m 0664 /var/folders/2r/zgyszxrj1hz1x_bkmnrlbz0h0000gn/T/tmp.IX8jNC9Dno/nix.conf /etc/nix/nix.conf to place the default nix daemon configuration (part 2) install: /etc/nix/nix.conf: No such file or directory ---- oh no! -------------------------------------------------------------------- Jeeze, something went wrong. If you can take all the output and open an issue, we'd love to fix the problem so nobody else has this issue. :( We'd love to help if you need it. You can open an issue at https://github.com/nixos/nix/issues Or feel free to contact the team: - Matrix: #nix:nixos.org - IRC: in #nixos on irc.libera.chat - twitter: @nixos_org - forum: https://discourse.nixos.org ```
hedefalk commented 2 years ago

Probably dupe of #5675

It's prob. old stuff in /etc/nix that's the culprit, I was misguided by stuff in tmp, of course not there after installer cleansup.

🐟 ll /etc/nix/
total 0
lrwxr-xr-x 1 root wheel 24 2022-03-25 nix.conf -> /etc/static/nix/nix.conf
lrwxr-xr-x 1 root wheel 29 2022-03-25 registry.json -> /etc/static/nix/registry.json
abathur commented 2 years ago

Agree that it looks like the same basic issue as 5675.

hedefalk commented 2 years ago

Forgot to report back. Removed those to symlinks and then fine.

hedefalk commented 2 years ago

Should prob. be left open though…?

Chuxel commented 2 years ago

This same error seems to be happening in GitHub Codespaces when a specific (Linux) image is used - might help with the repro. See #6680

arcuru commented 2 years ago

Unless I'm missing some nuance here, this should be duped to #5675 and closed. They have the same root issue and same fix.