My nixos configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

feature: prefer local build in nix (patch)

+17 -1
+4 -1
nixos/modules/flake.nix
··· 20 20 programs.command-not-found.dbPath = programsdb.packages.${pkgs.system}.programs-sqlite; 21 21 22 22 nix = { 23 - package = lib.mkDefault nix.packages.${pkgs.system}.nix; # pkgs.nixUnstable; 23 + package = lib.mkDefault (nix.packages.${pkgs.system}.nix.overrideAttrs (oa: { 24 + version = "${oa.version}_patched"; 25 + patches = [./prefer-local.patch]; 26 + })); 24 27 settings.experimental-features = ["nix-command" "flakes"]; 25 28 26 29 registry.nixpkgs.flake = unstable;
+13
nixos/modules/prefer-local.patch
··· 1 + diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc 2 + index cfc4baaca..4fbaae4fa 100644 3 + --- a/src/build-remote/build-remote.cc 4 + +++ b/src/build-remote/build-remote.cc 5 + @@ -122,6 +122,8 @@ static int main_build_remote(int argc, char * * argv) 6 + /* It's possible to build this locally right now: */ 7 + bool canBuildLocally = amWilling && couldBuildLocally; 8 + 9 + + if (canBuildLocally) continue; 10 + + 11 + /* Error ignored here, will be caught later */ 12 + mkdir(currentLoad.c_str(), 0777); 13 +