Nix: Add nix_local for local builds.

This commit is contained in:
Dmitry Voronin 2024-10-24 11:50:06 +03:00
parent 5014c45f99
commit 342ec6bbee
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -60,5 +60,11 @@
nix hash to-sri --type sha256 $(nix-prefetch-url "''${url}") nix hash to-sri --type sha256 $(nix-prefetch-url "''${url}")
} }
# Run nix locally with no builders.
# Usage: nix_local <COMMAND>
function nix_local() {
nix --option max-jobs $(_core_count) --builders "" --substituters https://cache.nixos.org ''${@}
}
''; '';
} }