From 342ec6bbee2e7fb3128729223359373b10d7d1d8 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 24 Oct 2024 11:50:06 +0300 Subject: [PATCH] Nix: Add nix_local for local builds. --- home/program/bash/module/Nix.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/program/bash/module/Nix.nix b/home/program/bash/module/Nix.nix index 31424bbe..5d00c7a0 100644 --- a/home/program/bash/module/Nix.nix +++ b/home/program/bash/module/Nix.nix @@ -60,5 +60,11 @@ nix hash to-sri --type sha256 $(nix-prefetch-url "''${url}") } + + # Run nix locally with no builders. + # Usage: nix_local + function nix_local() { + nix --option max-jobs $(_core_count) --builders "" --substituters https://cache.nixos.org ''${@} + } ''; }