For system and config replication I use chezmoi.
You can install it from arch repos.
Here is my config for reference.
You can combine both dotfiles and scripts in chezmoi. It’s a really powerful tool.
I just run this command on my new system
chezmoi init --apply sravanpannala