The Nix package manager should have a command to update the current version of Nix; this would prevent the hoops that I'm currently jumping through:
- Try to update an old machine with NixOS installed (from about 12 or 13 months ago), and watch it fail because the installed version of Nix is too old to evaluate the latest Nixpkgs.
- Consult https://nixos.org/wiki/How_to_update_when_Nix_is_too_old_to_evaluate_Nixpkgs, which suggests:
curl -L https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.nix.x86_64-linux/latest-finished/nix/pkg/nix-1.10-x86_64-linux.nixpkg | nix-install-package --non-interactive -
- ... which fails because, as Hydra reports, "Path /nix/store/6nkzpsw9wq4gfn84c4d0shjs9hqyw9jy-nix-1.11.4-debug is no longer available."
- Click through Hydra and try to find a recent evaluation, hoping that the store path hasn't disappeared.
- Find the nixos:trunk-combined:nixpkgs.nix.x86_64-linux job, find the latest evaluation (evaluated on 2016-10-29 18:50:01), and then try to fetch the "One-Click Install" build product.
- Get presented with a 404: "Path /nix/store/5q4rqc1fv1vi8z9g6ni0jlf7b802vm67-nix-1.11.4-debug is no longer available."
- Realize that I could just
nix-store --export $(nix-store -qR $(which nix-build)) > nix.closure from my up-to-date machine, copy that to a USB drive, and then nix-store --import nix.closure on the old machine.
- That fails with: "error: imported archive of '/nix/store/....-glibc-2.24' lacks a signature" (despite having
nix.requireSignedBinaryCaches = false; configured)
- Have no idea what to do about the missing signature.
I still haven't figure out how I'm going to upgrade, but I figure the next step is going to be trying to install from source, and hope that any transitive dependencies don't get me stuck in some sort of catch 22 scenario.
In my case, I've been using Nix/NixOS for a while now and am thoroughly convinced of the benefits (even if things get pretty damned bumpy every now and then), so this isn't going to turn me off. For new users, though, this sort of scenario would very likely be the thing that makes them say "fuck it" and warn their friends.
What we really need is a single command that can get people unstuck in these scenarios.
The Nix package manager should have a command to update the current version of Nix; this would prevent the hoops that I'm currently jumping through:
curl -L https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.nix.x86_64-linux/latest-finished/nix/pkg/nix-1.10-x86_64-linux.nixpkg | nix-install-package --non-interactive -nix-store --export $(nix-store -qR $(which nix-build)) > nix.closurefrom my up-to-date machine, copy that to a USB drive, and thennix-store --import nix.closureon the old machine.nix.requireSignedBinaryCaches = false;configured)I still haven't figure out how I'm going to upgrade, but I figure the next step is going to be trying to install from source, and hope that any transitive dependencies don't get me stuck in some sort of catch 22 scenario.
In my case, I've been using Nix/NixOS for a while now and am thoroughly convinced of the benefits (even if things get pretty damned bumpy every now and then), so this isn't going to turn me off. For new users, though, this sort of scenario would very likely be the thing that makes them say "fuck it" and warn their friends.
What we really need is a single command that can get people unstuck in these scenarios.