Nixos-option: flake does not exist

nixos-option claims the flake does not exist, why does it try to find it on store?
Probably because my previous build failed?

[sharpchen@nixos]$ nixos-option --flake "$(realpath ./flake.nix)" nix.nixPath --show-trace
error:
       … from call site
         at /nix/store/gj6hz9mj23v01yvq1nn5f655jrcky1qq-nixos-option.nix:1:1:
            1| {
             | ^
            2|   nixos,

       … while calling anonymous lambda
         at /nix/store/gj6hz9mj23v01yvq1nn5f655jrcky1qq-nixos-option.nix:1:1:
            1| {
             | ^
            2|   nixos,

       … while evaluating a branch condition
         at /nix/store/gj6hz9mj23v01yvq1nn5f655jrcky1qq-nixos-option.nix:160:1:
          159| in
          160| if !lib.hasAttrByPath path' nixos.config then
             | ^
          161|   throw "Couldn't resolve config path '${lib.showOption path'}'"

       … in the argument of the not operator
         at /nix/store/gj6hz9mj23v01yvq1nn5f655jrcky1qq-nixos-option.nix:160:5:
          159| in
          160| if !lib.hasAttrByPath path' nixos.config then
             |     ^
          161|   throw "Couldn't resolve config path '${lib.showOption path'}'"

       … while calling the 'getFlake' builtin
         at «string»:1:2:
            1| (builtins.getFlake "/home/sharpchen/.config/home-manager/flake.nix").nixosConfigurations."nixos"
             |  ^

       error: path '/nix/store/0qyfbai4qa6y6iwqdcvgi36mm578bnd6-source/flake.nix' does not exist

Give it a folder, not the flake.nix.

thanks, the man page is kind of confusing as it says it defaults to /etc/nixos/flake.nix