DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 7 million installs.
https://determinate.systems
GNU Lesser General Public License v2.1
2.21k stars 57 forks source link

Garuda Nix Subsystem remnants casued failed (un?)install #1087

Closed Violettica closed 1 month ago

Violettica commented 2 months ago

Error

Error: 
   0: Multiple errors

Metadata

key value
version 0.20.2
os linux
arch x86_64
Violettica commented 2 months ago

Full logs:

Nix uninstall plan (v0.20.2)

Planner: linux (with default settings)

Planned actions:
* Unconfigure Nix daemon related settings with systemd
* Remove the directory `/etc/tmpfiles.d` if no other contents exists
* Unconfigure the shell profiles
* Remove the Nix configuration in `/etc/nix/nix.conf`
* Unset the default Nix profile
* Remove Nix users and group
* Remove the directory tree in `/nix`
* Remove the directory `/nix`

Proceed? ([Y]es/[n]o/[e]xplain): 
 INFO Revert: Remove directory `/nix/temp-install-dir`
 INFO Revert: Configure Nix daemon related settings with systemd
 INFO Revert: Create directory `/etc/tmpfiles.d`
 INFO Revert: Configure Nix
 INFO Revert: Create build users (UID 30001-30032) and group (GID 30000)
 INFO Revert: Provision Nix
 INFO Revert: Create directory `/nix`
Error: 
   0: Multiple errors

Location:
   src/cli/subcommand/install.rs:285

Error:
   0: Action `create_group` errored
   1: Failed to execute command with status 8 `"groupdel" "nixbld"`, stdout: 
      stderr: groupdel: cannot remove the primary group of user 'nixbld01'

   1: 

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Consider reporting this error using this URL: https://github.com/DeterminateSystems/nix-installer/issues/new?title=%3Cautogenerated-issue%3E&body=%23%23+Error%0A%60%60%60%0AError%3A+%0A+++0%3A+Multiple+errors%0A%60%60%60%0A%0A%23%23+Metadata%0A%7Ckey%7Cvalue%7C%0A%7C--%7C--%7C%0A%7C**version**%7C0.20.2%7C%0A%7C**os**%7Clinux%7C%0A%7C**arch**%7Cx86_64%7C%0A
cole-h commented 2 months ago

How did you install Nix? I don't think we ever created build users with a leading 0 (i.e. nixbld01).

Violettica commented 2 months ago

This appears to be a remnant of my failed Garuda Nix Subsystem experiment. I did some digging on my own and found that removing all the offending users manually did the trick. A bit of an unfortunate trap for anyone who has had problems installing Nix before.

cole-h commented 1 month ago

I'm glad you were able to get it fixed! I think for now I'm going to close this, but if someone comes with a similar issue, we can reopen and explore ways to make that nicer. Thank you!