40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{
|
|
nixConfig = {
|
|
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://cache.nixos.org"
|
|
];
|
|
};
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.05-darwin";
|
|
darwin = {
|
|
url = "github:lnl7/nix-darwin/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-23.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, 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;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
}
|