flake/darwin/profiles/common/core/nix/nix.nix

31 lines
847 B
Nix
Raw Normal View History

2023-11-27 20:33:27 +08:00
{
2024-07-10 05:45:51 +08:00
lib,
2023-11-27 20:33:27 +08:00
pkgs,
config,
...
}: {
2023-10-14 10:20:42 +08:00
nix.settings = {
trusted-users = ["@admin"];
2023-11-27 20:33:27 +08:00
substituters =
2024-07-10 05:45:51 +08:00
(lib.optionals (config.time.timeZone == "Asia/Shanghai") [
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" # TUNA - 清华大学 Mirror
])
2023-12-03 16:16:41 +08:00
++ [
"https://nix-community.cachix.org"
"https://guanran928.cachix.org"
2023-11-27 20:33:27 +08:00
];
2023-10-14 10:20:42 +08:00
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"guanran928.cachix.org-1:BE/iBCj2/pqJXG908wHRrcaV0B2fC+KbFjHsXY6b91c="
2023-10-14 10:20:42 +08:00
];
use-xdg-base-directories = true;
};
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
nix.package = pkgs.nix;
# Set Git commit hash for darwin-version.
#system.configurationRevision = self.rev or self.dirtyRev or null;
2023-10-14 10:20:42 +08:00
}