My /etc/nixos/configuration.nix starts with { config, lib, modulesPath, pkgs, ... }:, because that's what was in whichever example I copied. A quick search through the NixOS manual, man nixos-generate-config, and man configuration.nix shows only examples with an even simpler { config, pkgs, ... }:.
Removing the , ... and running nixos-rebuild switch doesn't help; it prints the following three times:
error: anonymous function at /etc/nixos/configuration.nix:1:1 called with unexpected argument 'specialArgs', at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:372:8
How do I figure out its arguments?