From 7b35a5b1d1f07eb1c264f0be6bb57b65401bac7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Bourdeauducq?= Date: Wed, 30 Oct 2024 14:39:54 +0800 Subject: [PATCH] make high-priority nixbld substituter configurable in netboot image --- default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/default.nix b/default.nix index 66c1f69..b6fa91e 100644 --- a/default.nix +++ b/default.nix @@ -43,20 +43,20 @@ let nixos-install --no-root-password --flake /mnt/etc/nixos#artiq ''; - customModule = { + customModule = prioNixbld: { environment.systemPackages = [ autoInstall pkgs.git ]; documentation.info.enable = false; # https://github.com/NixOS/nixpkgs/issues/124215 documentation.man.enable = false; nix.settings.trusted-public-keys = ["nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="]; - nix.settings.substituters = ["https://nixbld.m-labs.hk?priority=10"]; + nix.settings.substituters = [("https://nixbld.m-labs.hk" + (if prioNixbld then "?priority=10" else ""))]; system.stateVersion = pkgs.lib.trivial.release; }; in - makeNetboot { + { prioNixbld ? false }: makeNetboot { modules = [ - customModule + (customModule prioNixbld) ]; system = "x86_64-linux"; }