I’ve built a new 23.05 derivation and switched to it via rebooting, but the SystemD startup terminal output still shows NixOS 22.11, as does Neofetch. Am I missing a step? Fwiw I’m still using configuration.nix, no flakes or home manager yet.
Are you sure it installed something? Nixos-rebuild is known to silently display critical errors and continue working like if it was fine. (missing disk space for example)
Same both before and after running nixos-rebuild boot --upgrade and rebooting. No build errors. I do have a new derivation listed in sudo nix-env --list-generations, and am currently running it, but looks like it’s 22.11 instead of 23.05.
However, per your request I’m trying switch now instead of boot and actually getting some boot errors and build failure now. I’ve never had it happen where nixos-rebuild boot completes but nixos-rebuild switch does not.
Normally when I get build errors like this I comment out the offending part of configuration.nix until the build succeeds. But I’m not sure what these errors correspond to. Output linked below, but the errors are:
…
Copying /nix/store/2r1kbrb3pdrki36g6dd7ky247q348clq-lvm2-2.03.16/lib/udev/rules.d/13-dm-disk.rules to /nix/store/zdqqxb758xm1fhcm46p5djaizlsj6mhq-udev-rules/13-dm-disk.rules
error: builder for ‘/nix/store/aipax37xnqkk779c1s7w5dn2xzalh7y2-nix.conf.drv’ failed with exit code 1
linking ‘/nix/store/9hspal1zvm25q0m3c3nmqm9ng6k237hv-btop-1.2.13/share/btop/themes/dracula.theme’ to ‘/nix/store/.links/1cacmg7xj08nc130xzwydvm7di9rjw2yvbw93ym3nyb5kl6qryl7’
…
linking ‘/nix/store/8864g645l6lws1n7wmnsyz81pldy4kqv-unit-40-enp6s0.link/40-enp6s0.link’ to ‘/nix/store/.links/0y49jsk69pjjqib9sh371n29riyqcqbi02gm0hxk8rch9zaai4x5’
error: 1 dependencies of derivation ‘/nix/store/rk72k6qxmf261kf8yq8iskj0arvlqpqc-etc.drv’ failed to build
linking ‘/nix/store/gqrqaypqs0bhr7wysjzpg9x6pp1wvrq0-brave-1.52.122/share/icons/hicolor/48x48/apps/brave-browser.png’ to ‘/nix/store/.links/0bmx22ki069z3lp4yjgr7z3c1ys9wiyq9vnxkrrwmbq6hs1xwwiy’
…
linking ‘/nix/store/gqrqaypqs0bhr7wysjzpg9x6pp1wvrq0-brave-1.52.122/bin/.brave-wrapped’ to ‘/nix/store/.links/0kpwlvf7plvk0c6h2912z0p2461nzzvq16abpqbam9glqprd32vq’
error: 1 dependencies of derivation ‘/nix/store/sv9z3p89f7rafr8sqf2xnvar08x3c13c-nixos-system-z11pa-d8-22.11.4490.41b86284d3e.drv’ failed to build
>
That might have been what happened. nixos-rebuild boot --upgrade completed without error, but didn’t actually create a 23.05 build it seems. Trying nixos-rebuild switch --upgrade and it’s throwing errors and failing to build. I didn’t realize those two could diverge in behavior like that.
That stuff about linking is noise, the three errors are cascading - nix.conf fails to build, so /etc can’t be built, so your system can’t be built.
I.e. the real error is:
error: builder for '/nix/store/aipax37xnqkk779c1s7w5dn2xzalh7y2-nix.conf.drv' failed with exit code 1
From the name of the derivation I’m going to guess it’s your nix configuration. Seems the option builds a little derivation.
Because of all the linking noise it’s hard to spot why it’s failing, but I guess whatever you set in nix.settings is broken? That checks out, according to the release notes the nix way nix settings work was changed, you can no longer set arbitrary keys I think. Nevermind, that was 22.11
I imagine it is also broken when you use boot, or you inadvertently built and deployed something else. I don’t think they can diverge otherwise, the difference is just that switch immediately executes the new activation command.
Edit: Ah, found it! Pastebin probably didn’t load the full file for searching. Line 644:
Oh man, thank you, I completely missed that line. It was supposed to be nix.settings.cores, not nix.settings.core. Fixing that eliminated all the build errors.
However, it was still stuck on 22.11. But I just now, after several more attempts, finally got it to upgrade to 23.05. I’m not even sure what I did or what config change got it working though. But at least I have a working 23.05 config now.