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

46 lines
1.1 KiB
Nix
Raw Normal View History

2024-07-09 21:45:51 +00:00
{
lib,
config,
...
}: {
2023-09-19 00:17:43 +00:00
nix.settings = {
2023-11-27 12:33:27 +00:00
substituters =
2024-07-09 21:45:51 +00:00
(lib.optionals (config.time.timeZone == "Asia/Shanghai") [
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
])
2023-12-03 08:16:41 +00:00
++ [
"https://nix-community.cachix.org"
"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="
"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"];
2024-07-07 13:40:43 +00:00
experimental-features = [
"auto-allocate-uids"
"cgroups"
"no-url-literals"
];
allow-import-from-derivation = false;
2024-01-24 18:06:42 +00:00
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
}