I cannot make sense of flakes

If you put your flake under /etc/nixos/flake.nix, you are able to run nixos-rebuild without any arguments, provided you expose an output with the hostname of you host, you already did so (if the hostname of your host is anakin)

It will also allow to run that command from any dir on your system.