You don't have to specify the nixosConfiguration name (e.g ~/flake#my-configuration)? Do you just name it "default" or something for that to work? I've never tried that.
Exactly as Macha said, if you name the attribute `nixosConfiguration.<hostname>`, `nixos-rebuild` will look for that attribute implicitly; you can still specify another configuration if you're e.g. in a VM or a live image.
I use an update script that overrides that location to $(pwd), and also uses nvd to print a package diff for the update. Among a few other niceties. With flakes, that's a regular nixos-rebuild flag; otherwise it's an envvar.
/etc/nixos is just the default, there's a number of ways to set your own path. One of the simplest might be to put "import /home/wherever" as the sole contents of configuration.nix.
That sounds like a nice little workflow; I might have to incorporate something like that with `nvd`...
Though, it should be said that `import /home/wherever` might not work if you switch to / use flakes, as that is likely outside of the flake's git repo (and thus impure).
Yeah, I symlink `/etc/nixos/configuration.nix` to my git repo. (I do keep a `hardware-configuration.nix` which isn't version controlled. I probably should add version-control at some point but for now it is simple enough to copy around and maybe make some minor tweaks).
You can also use `git init --separate-git-dir=~/something /etc/nixos` to keep the git data in your user directory while the config remains in the default location. I like this solution because it keeps the stuff I want to do as root (configuring the system) separate from what I want to do as regular user (tracking changes of the configuration).