flake/nixos/profiles/common/core/nix/nix.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2023-12-03 08:16:41 +00:00
{config, ...}: {
2023-09-19 00:17:43 +00:00
nix.settings = {
2023-11-27 12:33:27 +00:00
substituters =
2023-12-03 08:16:41 +00:00
{
"Asia/Shanghai" = [
2023-12-03 23:54:27 +00:00
"https://mirror.sjtu.edu.cn/nix-channels/store" # SJTU - 上海交通大学 Mirror
2023-11-27 12:33:27 +00:00
"https://mirrors.ustc.edu.cn/nix-channels/store" # USTC - 中国科学技术大学 Mirror
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
2023-12-03 08:16:41 +00:00
];
}
.${config.time.timeZone}
2023-12-03 23:54:56 +00:00
or []
2023-12-03 08:16:41 +00:00
++ [
"https://nix-community.cachix.org"
"https://cache.garnix.io"
"https://guanran928.cachix.org"
2023-11-27 12:33:27 +00:00
];
2023-09-19 00:17:43 +00:00
trusted-public-keys = [
2023-09-26 23:40:21 +00:00
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
"guanran928.cachix.org-1:BE/iBCj2/pqJXG908wHRrcaV0B2fC+KbFjHsXY6b91c="
2023-09-19 00:17:43 +00:00
];
2024-01-24 18:06:42 +00:00
trusted-users = ["@wheel"];
experimental-features = ["auto-allocate-uids" "cgroups"];
auto-allocate-uids = true;
builders-use-substitutes = true;
use-cgroups = true;
2023-09-19 00:17:43 +00:00
use-xdg-base-directories = true;
};
documentation = {
doc.enable = false;
info.enable = false;
nixos.enable = false;
};
2024-06-05 09:51:12 +00:00
# https://github.com/NixOS/nixpkgs/pull/308801
# nixos/switch-to-configuration: add new implementation
system.switch = {
enable = false;
enableNg = true;
};
2023-09-19 00:17:43 +00:00
}