{
  inputs,
  overlays,
}:
let
  inherit (inputs) darwin home-manager;
in
darwin.lib.darwinSystem {
  system = "aarch64-darwin";
  modules = [
    ./configuration.nix
    home-manager.darwinModules.home-manager
    inputs.nix-homebrew.darwinModules.nix-homebrew
    {
      nix-homebrew = {
        enable = true;
        user = "imnyang";
        mutableTaps = true;
        # nix-darwin's Homebrew module uses /opt/homebrew/bin/brew directly.
        # The nix-homebrew integration calls `brew` before it is on PATH.
        enableFishIntegration = false;
      };
    }
    {
      home-manager.useGlobalPkgs = true;
      home-manager.useUserPackages = true;
      home-manager.backupFileExtension = "backup";
      home-manager.extraSpecialArgs = { inherit inputs; };
      home-manager.users.imnyang = import ./home;
    }
  ];
  specialArgs = {
    inherit inputs;
    inherit overlays;
  };
}
