Github strategies for configuration.nix?

/etc/nixos being a git repository is a common solution. I usually clone it after I run nixos-generate-config (NixOS 23.11 manual | Nix & NixOS), put the generated configs into hosts/${hostname} subdirectory, customize it and then create a symlink before finishing the installation.

But you can place the configuration anywhere and run nixos-rebuild with -I nixos-config=path/to/your/configuration.nix.

Edit: I switched to doing the latter as it does not require fiddling with permissions in /etc.

7 Likes