Help with nixosModules flake output

I am trying to create a flake (and corresponding git repository) for sharing some common modules between my machines.

It basically just consists of the following:

{
  description = "Common NixOS configuration for my machines";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
  };

  outputs = { self, nixpkgs }: {

    nixosModules = {
      common.imports = [ ./modules/common.nix ];
      desktop.imports = [ ./modules/desktop.nix ];
      server.imports = [ ./modules/server.nix ];
    };
  };
}

In my server config flake I am trying to use it like this:

{
  description = "A very basic flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
    common.url = "git+file:///home/busti/projects/os-common";
  };

  outputs = { self, nixpkgs, common, ... }:
    {
      # individual host configurations
      nixosConfigurations = {
        foo = nixpkgs.lib.nixosSystem {
          system = "x86_64-linux";
          modules = [
            common.nixosModules.server
            ./system/base.nix
          ];
        };
      };
    };
}

However this produces the following error message:

error: getting status of '/nix/store/91dc29jcx81i54av9676dg89d12wfa0p-source/modules': No such file or directory

Am I missing something?

Did you add your files under “modules” to the git repo?

Oof, I put them in the root dir of the flake.