flake.nix

9cb45d050939b499e8e01ec9e4fe9be998d98dc4 · 1.6 KB · 56 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 # Linux builder on macos
31 virby.url = "github:quinneden/virby-nix-darwin";
32 };
33
34 outputs = { nixpkgs, home-manager, ... }@inputs: {
35 darwinConfigurations."RyanMac" = inputs.darwin.lib.darwinSystem {
36 system = "aarch64-darwin";
37 specialArgs = { inherit inputs; };
38 modules = [
39 { nixpkgs.config.allowUnfree = true; }
40 inputs.virby.darwinModules.default
41 ./hosts/RyanMac/configuration.nix
42 home-manager.darwinModules.home-manager
43 {
44 home-manager.useGlobalPkgs = true;
45 home-manager.useUserPackages = true;
46 home-manager.users.ryan = {
47 imports = [
48 inputs.zen-browser.homeModules.beta
49 ./users/ryan/home.nix
50 ];
51 };
52 }
53 ];
54 };
55 };
56 }