summary refs log tree commit diff
path: root/modules/nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nix.nix')
-rw-r--r--modules/nix.nix41
1 files 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 =