[PL-133484] nixos/platform: change default nix to 2.18 (prod) or 2.25 (non-prod) #1320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nix 2.24's inefficient Git tarball cache is a major problem for VMs[1] with low IOPS (default is 250). The way forward is
The challenge here is that
flyingcircus.agent.package
is supposed to be modified by downstream consumers, e.g. for Slurm support. Hence, the option isn't modified directly, but each agent package is post-processed viaapply
to useconfig.nix.package
.A nice side-effect of this is that setting
nix.package
also changes the Nix used by the agent, sonix.package
behaves as I'd expect it. Please note that this also means that settingnix.package
to e.g. Nix 2.26 implies a rebuild of the agent now.I decided against overriding
pkgs.nix
with an overlay since there are a bunch of packages out there that explicitly require a specific Nix version, so the potential fallout from that is higher than modifyingnix.package
.Additionally I changed the usage of Nix 2.24 in the following places:
The PATH of
fc-collect-garbage.service
doesn't have a Nix at all anymore. The agent package already prefers its own Nix, so this had no effect at all.The agent isn't built against 2.24 in pkgs/fc: I see no reason to do that since there's zero usage of this. It's now built with Nix 2.18 since that's what the majority of all VMs will use for now.
The variant with 2.25 is also built by Hydra because of the VM-test, so staging VMs don't have to build their own agent.
The sensu check-env uses the default Nix as well.
[1] See PL-133484 for measurements with Nix versions and related
upstream bugs.
@flyingcircusio/release-managers
Release process
./changelog.sh
PR release workflow (internal)
Design notes
on
oroff
. Example: rate limiting.nix.package
(that also changes the Nix used by the agent now).Security implications