2023-11-25 09:28:33 +00:00
|
|
|
{
|
2023-11-25 08:40:24 +00:00
|
|
|
nixConfig = rec {
|
2023-11-25 07:09:43 +00:00
|
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
2023-11-25 09:28:14 +00:00
|
|
|
substituters = [
|
2023-11-25 07:09:43 +00:00
|
|
|
# Replace official cache with a mirror located in China
|
|
|
|
#
|
|
|
|
# Feel free to remove this line if you are not in China
|
|
|
|
"https://mirrors.ustc.edu.cn/nix-channels/store"
|
2023-11-25 09:27:20 +00:00
|
|
|
"https://mirrors.ustc.edu.cn/nix-channels/store" # 中科大
|
|
|
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store" #清华
|
|
|
|
"https://mirrors.bfsu.edu.cn/nix-channels/store" # 北外
|
|
|
|
"https://mirror.sjtu.edu.cn/nix-channels/store" #交大
|
2023-11-25 09:23:01 +00:00
|
|
|
#"https://cache.nixos.org"
|
2023-11-25 07:09:43 +00:00
|
|
|
];
|
2023-11-25 08:40:24 +00:00
|
|
|
trusted-substituters = substituters;
|
|
|
|
trusted-users = [
|
|
|
|
"tonychyi"
|
|
|
|
];
|
2023-11-25 07:09:43 +00:00
|
|
|
};
|
|
|
|
|
2023-06-18 12:41:10 +00:00
|
|
|
inputs = {
|
2023-11-25 07:39:21 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
|
2023-11-25 07:09:43 +00:00
|
|
|
darwin = {
|
|
|
|
url = "github:lnl7/nix-darwin/master";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
home-manager = {
|
2023-11-25 07:39:21 +00:00
|
|
|
url = "github:nix-community/home-manager/release-23.11";
|
2023-11-25 07:09:43 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-06-18 12:41:10 +00:00
|
|
|
};
|
|
|
|
|
2023-11-25 07:11:50 +00:00
|
|
|
outputs = { self, nixpkgs, darwin, home-manager }: {
|
2023-06-18 12:41:10 +00:00
|
|
|
darwinConfigurations."mbp" = darwin.lib.darwinSystem {
|
|
|
|
system = "x86_64-darwin";
|
|
|
|
modules = [
|
|
|
|
./darwin-configuration.nix
|
|
|
|
home-manager.darwinModules.home-manager {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.tonychyi = import ./home.nix;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|