From 527c450a1e6de00c9c8a77d1251a8a626e6bd732 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 14 Feb 2025 02:30:24 +0100 Subject: Finally re-add the bismuth cache back to our machines Signed-off-by: Mel --- modules/nix.nix | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/modules/nix.nix b/modules/nix.nix index bfe09ff..a96813b 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -5,6 +5,14 @@ ... }: +let + inherit (lib) mkIf mkMerge; + + bismuthCache = { + substituters = [ "http://bismuth.serval-moth.ts.net:3000" ]; + trusted-public-keys = [ "bismuth-1:Fkyzfd9gfMUVKq/KfNClHaB2rUiAGtXTzYu96oZteKQ=" ]; + }; +in { nix = { # add compat scripts to the environment, @@ -14,21 +22,24 @@ "nixos-config=${self}/compat/nixos" ]; - settings = { - experimental-features = [ - "flakes" - "nix-command" - ]; - trusted-users = [ - "mel" - ]; - # usually my builders have faster connections - builders-use-substitutes = true; - # don't wait too long on caches that are down - connect-timeout = 3; - # yes nix, i know my flake is dirty!!! - warn-dirty = false; - }; + settings = mkMerge [ + { + experimental-features = [ + "flakes" + "nix-command" + ]; + trusted-users = [ + "mel" + ]; + # usually my builders have faster connections + builders-use-substitutes = true; + # don't wait too long on caches that are down + connect-timeout = 3; + # yes nix, i know my flake is dirty!!! + warn-dirty = false; + } + (mkIf (me != "bismuth") bismuthCache) + ]; distributedBuilds = true; buildMachines = -- cgit 1.4.1