NixOps/Virtualization: Difference between revisions
imported>Nix m add Server category |
imported>Iamko No edit summary |
||
Line 274: | Line 274: | ||
mkdir -p /mnt/etc/nix | mkdir -p /mnt/etc/nix | ||
echo 'build-users-group = ' > /mnt/etc/nix/nix.conf | echo 'build-users-group = ' > /mnt/etc/nix/nix.conf | ||
# at least since nix-2.3.16 we need a root user in the chroot | |||
# or else `nix-store --load-db` will fail with "cannot figure out user name" | |||
chroot /mnt ${pkgs.shadow}/bin/useradd -u 0 root | |||
# Register the paths in the Nix database. | # Register the paths in the Nix database. |