aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 023a368af0ad62d09cc7234785b955d9f2e4270f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
  description = "Example nix-darwin system flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
    darwin = {
      url = "github:nix-darwin/nix-darwin/master";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # My packages
    netbird-tui = {
      url = "git+https://git.rschanz.org/netbird-tui-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    # End my packages
    zen-browser = { # Used exclusively for HM module, Zen is installed via cask (on macos)
      url = "github:0xc000022070/zen-browser-flake";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        home-manager.follows = "home-manager";
      };
    };
    nix-homebrew.url = "github:zhaofengli/nix-homebrew";
    homebrew-core = {
      url = "github:homebrew/homebrew-core";
      flake = false;
    };
    homebrew-cask = {
      url = "github:homebrew/homebrew-cask";
      flake = false;
    };
    # Linux builder on macos
    virby.url = "github:quinneden/virby-nix-darwin";
    homebrew-netbird = {
      url = "github:netbirdio/homebrew-tap";
      flake = false;
    };
    homebrew-felixkratz = {
      url = "github:FelixKratz/homebrew-formulae";
      flake = false;
    };
  };

  outputs = { nixpkgs, home-manager, ... }@inputs: {
    darwinConfigurations."RyanMac" = inputs.darwin.lib.darwinSystem {
      system = "aarch64-darwin";
      specialArgs = { inherit inputs; };
      modules = [
        { nixpkgs.config.allowUnfree = true;
          nixpkgs.overlays = [ inputs.netbird-tui.overlays.default ]; }
        inputs.virby.darwinModules.default
        ./hosts/RyanMac/configuration.nix
        home-manager.darwinModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.users.ryan = {
              imports = [
                  inputs.zen-browser.homeModules.beta
                      ./users/ryan/home.nix
              ];
          };
        }
      ];
    };
  };
}