flake.nix

8f71fac972b4fe5a98459148d9b33d1748deaa7f · 1.5 KB · 53 lines raw

1 {
2 description = "Example nix-darwin system flake";
3
4 inputs = {
5 nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
6 darwin = {
7 url = "github:nix-darwin/nix-darwin/master";
8 inputs.nixpkgs.follows = "nixpkgs";
9 };
10 home-manager = {
11 url = "github:nix-community/home-manager";
12 inputs.nixpkgs.follows = "nixpkgs";
13 };
14 zen-browser = { # Used exclusively for HM module, Zen is installed via cask
15 url = "github:0xc000022070/zen-browser-flake";
16 inputs = {
17 nixpkgs.follows = "nixpkgs";
18 home-manager.follows = "home-manager";
19 };
20 };
21 nix-homebrew.url = "github:zhaofengli/nix-homebrew";
22 homebrew-core = {
23 url = "github:homebrew/homebrew-core";
24 flake = false;
25 };
26 homebrew-cask = {
27 url = "github:homebrew/homebrew-cask";
28 flake = false;
29 };
30 };
31
32 outputs = { nixpkgs, home-manager, ... }@inputs: {
33 darwinConfigurations."RyanMac" = inputs.darwin.lib.darwinSystem {
34 system = "aarch64-darwin";
35 specialArgs = { inherit inputs; };
36 modules = [
37 { nixpkgs.config.allowUnfree = true; }
38 ./hosts/RyanMac/configuration.nix
39 home-manager.darwinModules.home-manager
40 {
41 home-manager.useGlobalPkgs = true;
42 home-manager.useUserPackages = true;
43 home-manager.users.ryan = {
44 imports = [
45 inputs.zen-browser.homeModules.beta
46 ./users/ryan/home.nix
47 ];
48 };
49 }
50 ];
51 };
52 };
53 }