From dd0ab4139602c1f9fea763fcc23a00793b340741 Mon Sep 17 00:00:00 2001 From: Colin Date: Fri, 24 Nov 2023 08:13:17 +0000 Subject: [PATCH] refactor: move builders-user-substitutes to be near the other nix extraOptions --- hosts/common/default.nix | 6 ++++-- hosts/modules/nixcache.nix | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hosts/common/default.nix b/hosts/common/default.nix index 7dc8ee0d..28fa144b 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -34,11 +34,13 @@ nix.extraOptions = '' # see: `man nix.conf` - # allow `nix flake ...` command - experimental-features = nix-command flakes + # useful when a remote builder has a faster internet connection than me + builders-use-substitutes = true # default: false # maximum seconds to wait when connecting to binary substituter connect-timeout = 3 # default: 0 # download-attempts = 5 # default: 5 + # allow `nix flake ...` command + experimental-features = nix-command flakes # whether to build from source when binary substitution fails fallback = true # default: false # whether to keep building dependencies if any other one fails diff --git a/hosts/modules/nixcache.nix b/hosts/modules/nixcache.nix index 54de21a4..c084df3a 100644 --- a/hosts/modules/nixcache.nix +++ b/hosts/modules/nixcache.nix @@ -108,11 +108,5 @@ in }) ]; nix.distributedBuilds = lib.mkIf (cfg.remote-builders.desko || cfg.remote-builders.servo) true; - - # optional, useful when the builder has a faster internet connection than yours - # TODO: move this to hosts/common/default.nix where the other extraOptions are - nix.extraOptions = lib.mkIf (cfg.remote-builders.desko || cfg.remote-builders.servo) '' - builders-use-substitutes = true - ''; }; }