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

Lluís Batlle i Rossell viric at viric.name
Mon Mar 18 22:51:39 CET 2013


On Mon, Mar 18, 2013 at 10:46:32PM +0100, Bjørn Forsman wrote:
> Hi Bryce,
> 
> On 18 March 2013 22:02, Bryce L Nordgren <bnordgren at gmail.com> wrote:
> > Hi Bjorn,
> >
> > I hit this last week. The only way I got it to work again was to boot off of
> > a current nixos install disk and re-install. Once "nix" and "nixos-rebuild"
> > were working again, I could continue on with my own configuration.nix.
> 
> Hm... I thought NixOS had atomic upgrades? Or, if things broke anyway,
> that it would be fixable without using external tools. What's going
> on?
> 
> But thanks for telling me how you fixed it.

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.


So, what I'd do is to run manually the nixos command with the 1.5 nix:
/nix/store/*-nix-1.5*/bin/nix-env -p /nix/var/nix/profiles/system \
    -f '<nixos>' --set -A system

And then:
/nix/var/nix/profiles/system/bin/switch-to-configuration boot

I remember shlevy had a better suggestion on IRC, but I don't remember it.

Regards,
Lluís.



More information about the nix-dev mailing list