From 1f3591a693cbc031c32909adbfb6369327e80e01 Mon Sep 17 00:00:00 2001 From: Florian Agbuya Date: Tue, 20 Feb 2024 14:02:51 +0800 Subject: [PATCH] add nix substituters and update nix.conf --- pr-28.patch | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pr-28.patch b/pr-28.patch index 6ab2a07..68a3064 100644 --- a/pr-28.patch +++ b/pr-28.patch @@ -1,5 +1,5 @@ diff --git a/base.nix b/base.nix -index 7eaee32..8e317ec 100644 +index 7eaee32..3a2a0a9 100644 --- a/base.nix +++ b/base.nix @@ -27,6 +27,11 @@ with lib; @@ -14,8 +14,23 @@ index 7eaee32..8e317ec 100644 not-os.simpleStaticIp = mkOption { type = types.bool; default = false; -@@ -93,8 +98,14 @@ with lib; - build-cores = 4 +@@ -86,15 +91,25 @@ with lib; + "nix/nix.conf".source = pkgs.runCommand "nix.conf" {} '' + extraPaths=$(for i in $(cat ${pkgs.writeReferencesToFile pkgs.runtimeShell}); do if test -d $i; then echo $i; fi; done) + cat > $out << EOF +- build-use-sandbox = true ++ auto-optimise-store = true + build-users-group = nixbld +- build-sandbox-paths = /bin/sh=${pkgs.runtimeShell} $(echo $extraPaths) +- build-max-jobs = 1 +- build-cores = 4 ++ cores = 0 ++ extra-sandbox-paths = /bin/sh=${pkgs.runtimeShell} $(echo $extraPaths) ++ max-jobs = auto ++ sandbox = true ++ substituters = https://cache.armv7l.xyz ++ trusted-public-keys = cache.armv7l.xyz-1:kBY/eGnBAYiqYfg0fy0inWhshUo+pGFM3Pj7kIkmlBk= ++ trusted-users = root EOF ''; + "ssl/certs/ca-certificates.crt".source = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt"; -- 2.44.1