{ self, unstable, nix-darwin, ... } @ args: { mkDarwin = { name, nixpkgs ? unstable, system ? "aarch64-darwin", overlays ? null, extraModules ? null }: nix-darwin.lib.darwinSystem ( let configFolder = "${self}/darwin"; entryPoint = "${configFolder}/${name}/configuration.nix"; in { system = system; pkgs = import nixpkgs { inherit system; }; modules = [ { networking.hostName = name; system.configurationRevision = self.rev or self.dirtyRev; } entryPoint ] ++ nixpkgs.lib.optional (overlays != null) { nixpkgs.overlays = overlays; } ++ nixpkgs.lib.optionals (extraModules != null) extraModules; } ); }