Getting the HEAD of the Git tree failed

Hi,

Talking about - GitHub - sherubthakur/dotfiles: My dotfiles + system configuration for NixOS and mac

I just tried running nix run home-manager --no-write-lock-file -- switch --flake "./#nixos" but it gives an error

error: getting the HEAD of the Git tree '/home/kavija/.dotfiles' failed with exit code 1:
error: executing 'git' : No such file or directory

I’m new to NixOS. Is there a way to fix this ?

Add git in your environment.systemPackages.