hosts: add nix-cache module
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{ inputs, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix.settings = {
|
||||
substituters =
|
||||
let
|
||||
channelStore = x: "https://${x}/nix-channels/store";
|
||||
mirrors = map (x: channelStore "mirrors.${x}.edu.cn") [
|
||||
"bfsu"
|
||||
"tuna.tsinghua"
|
||||
"ustc"
|
||||
];
|
||||
cachix = x: "https://${x}.cachix.org";
|
||||
in
|
||||
lib.flatten [
|
||||
mirrors
|
||||
(cachix "nix-community")
|
||||
"https://cache.nixos.org"
|
||||
(cachix "inclyc")
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"inclyc.cachix.org-1:izGZ+f/JLPovKX1OKd3rQZ8nPOCpvPij3+bebjxdZ2k="
|
||||
];
|
||||
builders-use-substitutes = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user