48 lines
1.4 KiB
Nix
48 lines
1.4 KiB
Nix
{
|
|
nixConfig = rec {
|
|
experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
substituters = [
|
|
# 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"
|
|
"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" #交大
|
|
#"https://cache.nixos.org"
|
|
];
|
|
trusted-substituters = substituters;
|
|
trusted-users = [
|
|
"tonychyi"
|
|
];
|
|
};
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.11-darwin";
|
|
darwin = {
|
|
url = "github:lnl7/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, darwin, home-manager }: {
|
|
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;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|