[Nix-dev] cannot start worker (unexpected end-of-file)

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Mar 25 13:29:26 CET 2013


Hi,

On 18/03/13 22:51, Lluís Batlle i Rossell wrote:

> The trouble happens because "nixos-rebuild boot" will use your nix 1.5 to
> communicate with your nix 1.2 daemon.
> 
> When I see there is a nix update, I usually prefer to use "nixos-rebuild boot
> --no-build-nix", so the store doesn't get updated to a new version.
> 
> If the store gets updated to a new db version, and the following nixos build
> fails, you end up in your state: the next nixos-rebuild run won't understand
> the store.

FWIW, nixos-rebuild tries hard to prevent this situation.  It only uses the new
Nix for evaluation, not for accessing the store; the old daemon is used for
that.  So the schema should not be upgraded.

>From the nixos-rebuild source:

> # If the Nix daemon is running, then use it.  This allows us to use
> # the latest Nix from Nixpkgs (below) for expression evaluation, while
> # still using the old Nix (via the daemon) for actual store access.
> # This matters if the new Nix in Nixpkgs has a schema change.  It
> # would upgrade the schema, which should only happen once we actually
> # switch to the new configuration.
> if systemctl show nix-daemon.socket nix-daemon.service | grep -q ActiveState=active; then
>     export NIX_REMOTE=${NIX_REMOTE:-daemon}
> fi

-- 
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/


More information about the nix-dev mailing list