I have set up nix and home-manager on macOS (with much help from @tejing - many thanks again!), and am wanting to ‘do things right’, so am checking my setup in regards to using git properly.
In this tutorial Setting up Nix on macOS from scratch (incl. dotfiles via home-manager and Nix flakes (that has a different home-management config to mine), a git repo is created in:
~/.config/ git init
and
both nix/
and nixpkgs/
directories within ~/.config
are added to the git repo:
~/.config/ git add nix nixpkgs
My questions:
-
Other than files like flakes created for home-manager and programs, are
~/.config/
(or wherever ones config/dotfiles are) andnix/
andnixpkgs/
the only directories needing git repos? -
If I move and/or rename a directory or file or update a flake in a git repo, what is the process to inform nix via git?
-
I have searched for information on this subject and am failing to find it, so please share any links to a good tutorial on ‘best practices’ re the above - nix and git.
Many thanks!