about summary refs log tree commit diff
path: root/nix/flake/hosts.nix
blob: 8e9316a31067af39143d29f18437b01af8e7c5a0 (plain) (blame)
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
{ inputs, self, ... }:
let
  inherit (inputs) nixpkgs darwin home-manager firefox-darwin nur;
  inherit (nixpkgs.lib) mkMerge;

  mkDarwinConfig = system: path:
    darwin.lib.darwinSystem {
      inherit system;
      modules = [
        home-manager.darwinModule
        ../../hosts/common/darwin/homebrew.nix
        ../../hosts/common/darwin/macos.nix
        path
        {
          nixpkgs.overlays = [
            firefox-darwin.overlay
            nur.overlay
          ];
        }
      ];
      specialArgs = { inherit inputs self; };
    };
in
{
  flake = mkMerge [
    {
      darwinConfigurations = {
        mba-fcuny = mkDarwinConfig "aarch64-darwin" ../../hosts/mba;
        HQ-C02FK3Q7MD6T = mkDarwinConfig "x86_64-darwin" ../../hosts/work;
      };
    }
  ];
}