From 6f04698526c367bac1bb0715e3d9cf26dc6273d0 Mon Sep 17 00:00:00 2001 From: Mel Date: Sun, 27 Oct 2024 21:40:07 +0100 Subject: Use full tailnet URL for bismuth, document substitue order and compat scripts Signed-off-by: Mel --- modules/nix.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'modules/nix.nix') 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" -- cgit 1.4.1