| I have a pretty good cross-platform dotfiles setup for both Mac OS and Linux that I use Chezmoi to provision. I try not to repeat myself as much as possible. Here's my repository:
https://github.com/lkdm/dotfiles I use Linux at work and for gaming, and Mac OS for personal stuff. They both build from the same dotfiles repository. Some things I've learned is: - Manually set Mac's XDG paths to be equal to your Linux ones. It's much less hassle than using the default system ones. - See my .profile as an example on how I do this: https://github.com/lkdm/dotfiles/blob/main/dot_profile.tmpl
- Use Homebrew on both Linux and Mac OS for your CLI tools- Add Mac OS specific $PATH locations /bin, /usr/sbin, /sbin - Do NOT use Docker Desktop. It's terrible. Use the CLI version, or use the OrbStack GUI application if you must. - If you use iCloud, make a Zsh alias for the iCloud Drive base directory - Mac OS ships with outdated bash and git. If you use bash scripts with `#!/usr/bin/env bash`, you should install a newer version of bash with brew, and make sure Homebrew's opt path comes before the system one, so the new bash is prioritised. I hope this is helpful to you, so feel free to ask me anything about how I set up my dotfiles. |