Best way to manage system nix config in Windows WSL?

I usually rebuild-switch my system with this bash function I defined.

[j@remora-wsl:~/nixcfg]$ echo $NIXCFG

[j@remora-wsl:~/nixcfg]$ type rebuild-switch
rebuild-switch is a function
rebuild-switch ()
    nixos-rebuild switch --use-remote-sudo --flake "$NIXCFG"#"$(hostname)" -L "$@"

but this gives the error

[j@remora-wsl:~/nixcfg]$ rebuild-switch
error: path '/home/j/nixcfg' is not a flake (because it's not a directory)

as the directory is symbolically linked for easier use in windows subsystem for linux (WSL).

Alternatively, I can explicitly type the path to the actual source of sys flake.nix and it’ll work.

The solution is to set my NIXCFG for my host, remora-wsl, to the actual source, /mnt/c/Users/James/projects/nixcfg

I usually edit nix config files in editor outside of WSL, but can also keep the sym linked dir for editing using vim within WSL.

Just realized the solution as I putting together the problem explanation ^