Flake specialArgs

Hey hey,
I was refactoring my config, and ran into a surprising error that took me a long time to pinpoint.
updating the nixosConfigurations attribute causes a runtime, but not build error.

Running agenix rekey gives error: The option 'age' does not exist. Definition values: ...

  ...
  outputs =
    {
      self,
      nixpkgs,
      agenix,
      agenix-rekey,
      <snip>
      ...
    }:
    let
      inherit (nixpkgs) lib; # thanks sigmasquadron
      hostPlatform = "x86_64-linux"; # thanks isabelroses
      specialArgs = {
        inherit self;
        inherit (self) inputs;
      };
      ifExists = p: lib.optional (builtins.pathExists p) p;
      systems = {
        pantheon = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPdyrnxYVvwgr874QrS9nrXrqpK299d4isNCmUkOqwq";
        hermes = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDIMO9+9IsmigiZMJuibxsqnK2/GxFCgAwESQb/XA0Yc";
        kharon = "ssh-ed25519 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
      };
    in
      {
        nixosConfigurations = lib.recursiveUpdate (lib.genAttrs (builtins.attrNames systems) (
          hostName:
          lib.nixosSystem {
            inherit specialArgs;
            modules = [
              <snip>
              agenix.nixosModules.default
              agenix-rekey.nixosModules.default
              disko.nixosModules.disko
              {
                nixpkgs = { inherit hostPlatform; };
                networking = { inherit hostName; };
                age.rekey.hostPubkey = systems.${hostName}; # big baller moves
                environment.systemPackages = [
                    self.inputs.agenix-rekey.packages."${hostPlatform}".default
                ];
              }
            ]
            ++ lib.optionals (hostName != "kharon") [
              lanzaboote.nixosModules.lanzaboote
            ]
            # import additional hw/disko configurations
            ++ (ifExists ./configurations/disko-${hostName}.nix);
          }
        ))
        {
          # configuration for builidng qcow2 images
          build-qcow2 = lib.nixosSystem {                  <--- cause of the error
            system = hostPlatform;                              # commenting these lines
            inherit specialArgs;                                # fixes it
            modules = [                                        
              ./configurations/common.nix                      
              ./mods/qcow.nix                                       
            ];                                                               
          };
        }
        ;
    ... <snip>
}

commenting out the build-qcow2 attr fixes the error, anyone know why this happens? full conf here

oops, was user error. I was importing something i shouldn’t have all along…