Updating NixOS and my computer is trying to build EVERYTHING from source!

I am running this command:

NIX_BUILD_CORES=4 nixos-rebuild -j 1 -I nixpkgs=/home/zero/nixpkgs build

against nixpkgs that is checked out at commit 49efda9011e8cdcd6c1aad30384cb1dc230c82fe

and the build starts building 30zks51nfb347qwbrbxzxk2xbhk2qzg5-harfbuzz-5.2.0.drv from source. I can see that hydra has this built here: Hydra - Build 208573269 of job nixos:release-22.11:nixpkgs.harfbuzz.x86_64-linux and the drv has a different hash (7pm2jpcx5km6amcc9gm1vnmgslnh86mm-harfbuzz-5.2.0.drv)

and for other packages it’s only building from source, which will take forever to finish the upgrade on the system. I cannot figure out why it isn’t pulling things from the binary cache at all!

I’ve checked that I’m not using any overlays (there’s no /root/.config/nixpkgs or /home/zero/.config/nixpkgs)

This is the output of nix --experimental-features nix-command show-config|grep subst:

builders-use-substitutes = false
substitute = true
substituters = https://cache.nixos.org/
trusted-substituters = 

Here is my configuration.nix:

# Edit this configuration file to define what should be installed on your system.  Help is 
# available in the configuration.nix(5) man page and in the NixOS manual (accessible by running 
# ‘nixos-help’).

{ config, pkgs, ... }:

{
  imports =
    [ # Include the results of the hardware scan.
      ./hardware-configuration.nix
      #./networking.nix
      #./packages.nix
      #./desktop.nix
      #./netdata.nix
      #./users.nix
      #./samba.nix
      #./postgresql.nix
      #./http.nix
      #./mpd.nix
      #./ruma.nix
      #./matrix.nix
      #./audio.nix
      #./borgbackup.nix
      #./yacy.nix
      #./stream_audio.nix
    ];

  nixpkgs.config.allowUnfree = false;
  nixpkgs.config.enableParallelBuildingByDefault = true;

  time.timeZone = "UTC";

  # Use the GRUB 2 boot loader.
  boot.loader.grub = {
    enable = true;
    version = 2;
    device = "/dev/sdb";
    configurationLimit = 30;
  };

  system.autoUpgrade.enable = false;

  # Select internationalisation properties. i18n = {
  #   consoleFont = "lat9w-16"; consoleKeyMap = "us"; defaultLocale = "en_US.UTF-8";
  # };

  # List services that you want to enable:

  # Enable the OpenSSH daemon.
  services.openssh.enable = true;
  services.openssh.passwordAuthentication = false;
  services.openssh.forwardX11 = true;

  # virtualisation.virtualbox.host = {
  #   enable = false;
  #   enableHardening = false;
  # };

  services.transmission = {
    enable = true;
    settings = {
      #<REDACTED>
    };
  };

  system.stateVersion = "22.05";
}

A few notes

The git checkout of nixpkgs I am referencing has an effect on the build. If I check out origin/nixos-22.05 nothing is compiled (because that is what the system was on before).

Changing configuration.nix had an effect on how many packages it was going to build, so it’s not like I’m looking at the wrong file there either.

With commit I get the same result as hydra.

So you have some impurity here that changes your harfbuzz.

I believe nixpkgs.config.enableParallelBuildingByDefault = true; in my configuration.nix was causing this.

enableParallelBuilding will cause a mass rebuild.