This repository has been archived on 2024-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
my-darwin-nix-configuration/flake.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

2023-06-18 12:41:10 +00:00
{
2023-11-25 07:09:43 +00:00
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"
];
};
2023-06-18 12:41:10 +00:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-23.05-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:35:50 +00:00
url = "github:nix-community/home-manager";
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;
}
];
};
};
}