summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 3f110c19847f533b6434d21fbce59560c9478ce4 (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
{
  description = "My main dotfiles 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";
    };

    # Shared between darwin and linux
    zen-browser = {
      url = "github:0xc000022070/zen-browser-flake";
      inputs = {
        nixpkgs.follows = "nixpkgs";
        home-manager.follows = "home-manager";
      };
    };

    # Darwin-only
    netbird-tui = {
      url = "git+https://git.rschanz.org/netbird-tui-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    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;
    };
    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;
    };

    nixgl = {
      url = "github:ryan77627/nixGL";
      inputs.nixpkgs.follows = "nixpkgs";
    };
    clipboard-sync = {
      url = "github:dnut/clipboard-sync";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  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/common.nix
              ./users/ryan/darwin.nix
            ];
          };
        }
      ];
    };

    homeConfigurations."ryan" = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      extraSpecialArgs = { inherit inputs; };
      modules = [
        { nixpkgs.config.allowUnfree = true; }
        inputs.zen-browser.homeModules.beta
        ./users/ryan/common.nix
        ./users/ryan/linux.nix
        ./users/ryan/linux/foreign.nix
        ./users/ryan/linux/guix.nix
      ];
    };
  };
}