In this thread, @luochen1990 figured out how to set the priority of a substituter with nix.settings.substituters = lib.mkBefore [ "https.mirrors.somesite.com/nix-channels/store" ]
.
How do I accomplish this with flakes? I have added a substituter to my flake.nix
like this:
nixConfig = {
trusted-substituters = [
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
"https://cache.nixos.org"
];
And it does add the Tsinghua substituter, but I cannot figure out how I can change the substituter order from within the flake.nix
file so that it uses Tsinghua’s server before relying on cache.nixos.org.