elitak / nixos-infect

[GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot find name for group ID 30000

tcurdt opened this issue · comments

I am trying to infect a Debian Buster (on Contabo) but it fails

curl https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect | NIX_CHANNEL=nixos-23.11 bash 2>&1 | tee /tmp/infect.log
...
  /nix/store/04jlkfx39iapyi3fdrcn23gyb7kbb35j-nixos-system-vmd45108-23.11.6331.90055d5e616b.drv
building '/nix/store/y1v6lzd4yp9qvr32vq17mdzh3qz5gs4s-mounts.sh.drv'...
building '/nix/store/kpx11v8dxdswzgxq65pff6mbvnvz3f36-logrotate.conf.drv'...
/nix/store/26zdl4pyw5qazppj8if5lm8bjzxlc07l-coreutils-9.3/bin/id: cannot find name for group ID 30000
error: builder for '/nix/store/kpx11v8dxdswzgxq65pff6mbvnvz3f36-logrotate.conf.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/rm7nci47ij4rdw8k9hkcn9plkxqf7rcq-unit-logrotate-checkconf.service.drv' failed to build
building '/nix/store/4xllf5ckydkq17h4dnr4akam5pn7iixv-nix.conf.drv'...
error: 1 dependencies of derivation '/nix/store/50xpvapkb39jvmb9i0p92ywjvk9y0c5z-system-units.drv' failed to build
error: 1 dependencies of derivation '/nix/store/3dq9vh85s0xfzc227mvw0lwr599qc1zi-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/04jlkfx39iapyi3fdrcn23gyb7kbb35j-nixos-system-vmd45108-23.11.6331.90055d5e616b.drv' failed to build

"cannot find name for group ID 30000"?

How is that such a problem?

Turns out this was some sandbox problem (that I don't understand yet).

nix build --extra-experimental-features 'nix-command flakes' --impure --expr '(import (builtins.getFlake "nixpkgs") {}).runCommand "" {} "id -g"' -L
unknown> 30000

I had to create /etc/nixos/nix.conf and add

sandbox = false
#sandbox = true
#sandbox-fallback = false

To activate I had move some dirs away and touch /etc/NIXOS.

Hey @tcurdt , I'm facing the same issue and despite creating that config and touching that file - no change here.

Any idea which files you moved?

Another hacky workaround I managed to find was once this fails - add the following to your nix config:

services.logrotate.enable = false;

This isn't ideal but it'll get you past that error and hopefully into a working system. Then you can try to resolve the matter from there.

Any idea which files you moved?

Sorry, cannot remember. I worked through this in the matrix chat.

I really wish this would just work :-/
It's a bit a of headache when trying to use this with cloudinit for a fresh nixos install.