2023-11-27 12:33:27 +00:00
|
|
|
{
|
2024-07-09 21:45:51 +00:00
|
|
|
lib,
|
2023-11-27 12:33:27 +00:00
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: {
|
2023-10-14 02:20:42 +00:00
|
|
|
nix.settings = {
|
2023-11-04 10:14:42 +00:00
|
|
|
trusted-users = ["@admin"];
|
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"
|
2024-02-27 07:44:40 +00:00
|
|
|
"https://guanran928.cachix.org"
|
2023-11-27 12:33:27 +00:00
|
|
|
];
|
2023-10-14 02:20:42 +00:00
|
|
|
trusted-public-keys = [
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
2024-02-27 07:44:40 +00:00
|
|
|
"guanran928.cachix.org-1:BE/iBCj2/pqJXG908wHRrcaV0B2fC+KbFjHsXY6b91c="
|
2023-10-14 02:20:42 +00:00
|
|
|
];
|
|
|
|
use-xdg-base-directories = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Auto upgrade nix package and the daemon service.
|
|
|
|
services.nix-daemon.enable = true;
|
|
|
|
nix.package = pkgs.nix;
|
|
|
|
|
2023-10-15 04:38:49 +00:00
|
|
|
# Set Git commit hash for darwin-version.
|
|
|
|
#system.configurationRevision = self.rev or self.dirtyRev or null;
|
2023-10-14 02:20:42 +00:00
|
|
|
}
|