treewide: set mirrors by timezone
This commit is contained in:
parent
cfb574cb7b
commit
97072e8eae
2 changed files with 39 additions and 20 deletions
|
@ -1,15 +1,25 @@
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["@admin"];
|
trusted-users = ["@admin"];
|
||||||
substituters = [
|
substituters =
|
||||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
lib.mkMerge
|
||||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
[
|
||||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
(lib.mkIf (config.time.timeZone == "Asia/Shanghai") [
|
||||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
||||||
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
||||||
"https://nix-community.cachix.org"
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
||||||
"https://cache.garnix.io"
|
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
||||||
];
|
])
|
||||||
|
[
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
]
|
||||||
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
|
|
@ -1,15 +1,24 @@
|
||||||
{lib, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["@wheel"];
|
trusted-users = ["@wheel"];
|
||||||
substituters = [
|
substituters =
|
||||||
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
lib.mkMerge
|
||||||
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
[
|
||||||
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
(lib.mkIf (config.time.timeZone == "Asia/Shanghai") [
|
||||||
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
|
||||||
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
|
||||||
"https://nix-community.cachix.org"
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # BFSU - 北京外国语大学 Mirror
|
||||||
"https://cache.garnix.io"
|
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
|
||||||
];
|
])
|
||||||
|
[
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
"https://cache.garnix.io"
|
||||||
|
]
|
||||||
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||||
|
|
Loading…
Reference in a new issue