⚡ Optimize unstable nixpkgs instantiation#14
Conversation
Move the instantiation of `nixpkgs-unstable` from the per-host module to `flake.nix` to avoid repeated evaluation for every host.Pass the instantiated package set via `specialArgs` to the modules. Co-authored-by: whitestrake <9500326+whitestrake@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What:
nixpkgs-unstableout ofcommon/all-systems.nix(which runs for every host) intoflake.nix(which runs once per system architecture).unstablepackage set to modules viaspecialArgs.common/all-systems.nixto use the injectedunstableargument in the overlay.🎯 Why:
nixpkgs-unstablewas imported and instantiated separately for every single host configuration. This is inefficient as it forces the evaluation of the entire unstable package set multiple times (once for each host of the same architecture).flake.nixand sharing it, we reduce redundant evaluation work.📊 Measured Improvement:
time nix eval .#checks.x86_64-linux --apply 'x: map (n: x.${n}.drvPath) (builtins.attrNames x)'PR created automatically by Jules for task 7694995513334571880 started by @whitestrake