Consumable NixOS flake

Hi, I’ve been working on my flake (we’ll call it Flake Common) to make it so that I can use my modules from other flakes (like Flake Work), ideally with the output nixosModules.

But there is one thing that I haven’t been able to do, which is building my modules so that they reference the inputs inside Flake Common, and not the flake in which the modules are imported (like Flake Work, for example).

Flake Common is at GitHub - Toomoch/nixos-config: My NixOS flake for all my machines including a homelab (h81), it has the nixosModule.common with contains all my modules, and some of them use inputs.

Here is a snippet of the output part of Flake Common:

nixosModules.common = import ./system/modules {inherit inputs;};

Here is a snippet of Flake Work (private):

      nixosConfigurations = {
        somename = nixpkgs-stable.lib.nixosSystem {
          system = "x86_64-linux";

          specialArgs = {
            inherit inputs;

          modules = [
              home-manager = {
                useGlobalPkgs = true;
                extraSpecialArgs = { inherit inputs; };
                users.arnau.imports = [

When I build Flake Work, it fails with
The option `sops' does not exist.
sops-nix is an input inside Flake Common.

Also, there is probably another way to make all of my setup easier.