Skip to content

Commit

Permalink
darwin.builder: Fix gratuitous rebuilds
Browse files Browse the repository at this point in the history
See the discussion starting here:

#206951 (comment)

The `darwin.builder` derivation had a gratuitous dependency
on the current Nixpkgs revision due to
`config.system.nixos.revision`.  Setting the revision explicitly
to null fixes this problem and prevents the derivation from being
rebuilt on every change to Nixpkgs.

(cherry picked from commit 474198f)
  • Loading branch information
Gabriella439 authored and github-actions[bot] committed Dec 27, 2022
1 parent a27ee8b commit 351dd3b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nixos/modules/profiles/macos-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ in
};
});

system.stateVersion = "22.05";
system = {
# To prevent gratuitous rebuilds on each change to Nixpkgs
nixos.revision = null;

stateVersion = "22.05";
};

users.users."${user}"= {
isNormalUser = true;
Expand Down

0 comments on commit 351dd3b

Please sign in to comment.