{ lib, moduleLocation, ... }: let inherit (lib) mapAttrs mkOption types ; in { # Currently, there's no nix-darwin module for flake-parts, # so we have to manually add flake.darwinModules. # The flake.darwinConfigurations as already been added to nix-darwin. options.flake.darwinModules = mkOption { type = types.lazyAttrsOf types.deferredModule; default = { }; apply = mapAttrs ( k: v: { _file = "${toString moduleLocation}#darwinModules.${k}"; imports = [ v ]; } ); description = '' nix-darwin modules. You may use this for reusable pieces of configuration, service modules, etc. ''; }; }