I simply separate user/machine specific things into separate files, and don’t commit them to public repository (https://github.com/alexott/emacs-configs - it wasn’t updated for a long time, and it needs to be rewritten to modern stuff - first line was written 25 years ago)... But this may allow sharing, and even contributions...