summary refs log tree commit diff
path: root/modules/nix.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-10-27 21:40:07 +0100
committerMel <einebeere@gmail.com>2024-10-27 21:40:07 +0100
commit6f04698526c367bac1bb0715e3d9cf26dc6273d0 (patch)
tree22f04dff0b3b69e3832425c30ffc0327df075674 /modules/nix.nix
parent3d8e9a884399029dc7281d3b0589e3b831d93587 (diff)
downloadminerals-6f04698526c367bac1bb0715e3d9cf26dc6273d0.tar.zst
minerals-6f04698526c367bac1bb0715e3d9cf26dc6273d0.zip
Use full tailnet URL for bismuth, document substitue order and compat scripts
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'modules/nix.nix')
-rw-r--r--modules/nix.nix11
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/nix.nix b/modules/nix.nix
index b41d81a..4d8109e 100644
--- a/modules/nix.nix
+++ b/modules/nix.nix
@@ -2,16 +2,23 @@
 
 let
   imNotBismuth = (me != "bismuth");
+  
+  # nixos by default likes to place the default cache
+  # at the end, but bismuth is often offline, and the
+  # default cache should be preferred if it has the
+  # necessary derivation
+  mkPostfix = x: lib.mkOrder 2000 x;
 
   bismuthCacheSettings = { 
-    substituters = [ "http://bismuth:5000" ];
+    substituters = mkPostfix [ "http://bismuth.serval-moth.ts.net:5000" ];
     trusted-public-keys = [ "bismuth-1:XW9nsNsccipbmdfchyb3YIIWNT058iSpHLwlj1xgB7A=" ];
   };
 
 in
 {
   nix = {
-    # 
+    # add compat scripts to the environment,
+    # to allow nixos-option to find the configuration
     nixPath = [
       "nixpkgs=${self}/compat"
       "nixos-config=${self}/compat/nixos"