Open uprasad99 opened 7 months ago
Sounds like you already have a user with the same UID (see https://github.com/NixOS/nix/issues/6153).
The easy workaround is deleting that user/users if you no longer use the software that needs them. If you still need them, there's an overview of how to find a different UID range and modify the installer in this comment:
I just deleted the conflicting user and ran
curl -L https://nixos.org/nix/install | sh
and now I get this output
% 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 4052 100 4052 0 0 4278 0 --:--:-- --:--:-- --:--:-- 4278
downloading Nix 2.21.0 binary tarball for aarch64-darwin from 'https://releases.nixos.org/nix/nix-2.21.0/nix-2.21.0-aarch64-darwin.tar.xz' to '/var/folders/1q/v7m3hq452zl_sjqp_xr8_5sh0000gq/T/nix-binary-tarball-unpack.XXXXXXXXXX.drdzM90f'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12.0M 100 12.0M 0 0 11.9M 0 0:00:01 0:00:01 --:--:-- 11.9M
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 (uids [301..332]) and groups (gid 30000)
that the Nix daemon uses to run builds. To create system users
in a different range, exit and run this tool again with
NIX_FIRST_BUILD_UID set.
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?
No TTY, assuming you would say yes :)
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?
No TTY, assuming you would say yes :)
---- let's talk about sudo -----------------------------------------------------
This script is going to call sudo a lot. Normally, it would show you
exactly what commands it is running and why. However, the script is
run in a headless fashion, like this:
$ curl -L https://nixos.org/nix/install | sh
or maybe in a CI pipeline. Because of that, I'm going to skip the
verbose output in the interest of brevity.
If you would like to
see the output, try like this:
$ curl -L -o install-nix https://nixos.org/nix/install
$ sh ./install-nix
~~> 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.
---- Found existing Nix volume -------------------------------------------------
special: disk3s7
uuid: 9650CC77-AD8B-4A33-8C8D-7EF76AB67720
encrypted: yes
Verifying the specific cryptographic user 9650CC77-AD8B-4A33-8C8D-7EF76AB67720 on APFS Volume disk3s7
Passphrase valid
Found a working decryption password in keychain :)
During install, I add 'nix' to /etc/synthetic.conf, which instructs
macOS to create an empty root directory for mounting the Nix volume.
Can I remove /etc/synthetic.conf?
No TTY, assuming you would say yes :)
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?
No TTY, assuming you would say yes :)
The installer adds a LaunchDaemon to mount your Nix volume: org.nixos.darwin-store
Can I remove it?
No TTY, assuming you would say yes :)
~~> 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.
---- Nix config report ---------------------------------------------------------
Temp Dir: /var/folders/1q/v7m3hq452zl_sjqp_xr8_5sh0000gq/T/tmp.ecYzgXR0
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?
No TTY, assuming you would say yes :)
---- 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.
~~> Configuring /etc/synthetic.conf to make a mount-point at /nix
~~> Creating a Nix volume
Volume Nix Store on disk3s7 force-unmounted
~~> Configuring /etc/fstab to specify volume mount options
~~> Configuring LaunchDaemon to mount 'Nix Store'
~~> Setting up the build group nixbld
Exists: Yes
~~> Setting up the build user _nixbld1
---- oh no! --------------------------------------------------------------------
It seems the build user _nixbld1 already exists, but with the UID
with the UID ''. This script can't really handle that right
now, so I'm going to give up.
If you already created the users and you know they start from
and go up from there, you can edit this script and change
NIX_FIRST_BUILD_UID near the top of the file to and try
again.
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
Hmm. AFAIK the earlier error message should've meant that dscl didn't create _nixbld1, but this last run does seem to indicate that you've got one. Not sure if that means you had Nix installed previously (or maybe some state migrated via Migration Assistant), or if dscl ~lied about not creating the user...
I can't swear it'll work, but I'd try to follow the uninstall instructions here and then give a reinstall one more go: https://nixos.org/manual/nix/stable/installation/uninstall.html#macos
Platform
Additional information
ran
locally in a git repository which automatically started to install nix
Output
Output
```log Nix is not installed. Devbox will attempt to install it. Press enter to continue or ctrl-c to exit. Installing nix with: curl -L https://releases.nixos.org/nix/nix-2.18.1/install | sh -s This may require sudo access. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4052 100 4052 0 0 9414 0 --:--:-- --:--:-- --:--:-- 9423 downloading Nix 2.18.1 binary tarball for aarch64-darwin from 'https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-aarch64-darwin.tar.xz' to '/var/folders/1q/v7m3hq452zl_sjqp_xr8_5sh0000gq/T/nix-binary-tarball-unpack.XXXXXXXXXX.0Y6cox3l'... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 10.9M 100 10.9M 0 0 11.3M 0 --:--:-- --:--:-- --:--:-- 11.3M 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 (uids [301..332]) and groups (gid 30000) 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? No TTY, assuming you would say yes :) 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? No TTY, assuming you would say yes :) ---- let's talk about sudo ----------------------------------------------------- This script is going to call sudo a lot. Normally, it would show you exactly what commands it is running and why. However, the script is run in a headless fashion, like this: $ curl -L https://nixos.org/nix/install | sh or maybe in a CI pipeline. Because of that, I'm going to skip the verbose output in the interest of brevity. If you would like to see the output, try like this: $ curl -L -o install-nix https://nixos.org/nix/install $ sh ./install-nix ~~> 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. ~~> 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. ---- Nix config report --------------------------------------------------------- Temp Dir: /var/folders/1q/v7m3hq452zl_sjqp_xr8_5sh0000gq/T/tmp.h9Fnq3aS 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? No TTY, assuming you would say yes :) ---- 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. ~~> Configuring /etc/synthetic.conf to make a mount-point at /nix Authorization Required: This application requires administrative access. If you are sure, enter your local username and password to continue. Password: ~~> Creating a Nix volume disk3s7 was already unmounted ~~> Configuring /etc/fstab to specify volume mount options ~~> Encrypt the Nix volume Volume Nix Store on Nix Store mounted Encrypting with the new "Disk" crypto user on disk3s7 The new "Disk" user will be the only one who has initial access to disk3s7 The new APFS crypto user UUID will be 9650CC77-AD8B-4A33-8C8D-7EF76AB67720 Encryption has likely completed due to AES hardware; see "diskutil apfs list" Volume Nix Store on disk3s7 force-unmounted ~~> Configuring LaunchDaemon to mount 'Nix Store' ~~> Setting up the build group nixbld Created: Yes ~~> Setting up the build user _nixbld1Priorities
Add :+1: to issues you find important.