How can i make home-manager.nixosModules section separated from the all-'flake.nix'?

	outputs = inputs@{ nixpkgs, home-manager, nix-index-database, nixvim, ... }: let inherit (import ./modules/variables.nix) username; in {
		nixosConfigurations = {
			office = nixpkgs.lib.nixosSystem {
				system = "x86_64-linux";
				modules = [
					./modules/unstable-overlay.nix

					./modules/system
					./modules/hardware/hardware-office
					./hardware-configuration.nix

					nix-index-database.nixosModules.nix-index

					home-manager.nixosModules.home-manager {
						home-manager.useGlobalPkgs = true;
						home-manager.useUserPackages = true;
						home-manager.sharedModules = [
							nixvim.homeManagerModules.nixvim
							nix-index-database.hmModules.nix-index
							{ programs.nix-index-database.comma.enable = true; }
						];
						home-manager.users.${username} = import ./modules/home;
					}
....

I have the following nix code and I want to move home-manager.nixosModules section to another file and import in modules array, I tried so much thing but nothing worked.

How can i make home-manager.nixosModules section separated from the all-‘flake.nix’?
Thanks for all helps.