In NixOS containers, root doesn't have write permission to /nix/var/nix/db, so it has to use the daemon.