Hacker News new | ask | show | jobs
by cbarrick 654 days ago
Big +1 to forgetting about dotfile managers, and scripting it out.

I just keep my dotfiles repo in the same tree structure as the home directory, and loop over the tree to create symlinks. Plus some miscellaneous commands to set some other things up.

https://github.com/cbarrick/dotfiles

1 comments

> I just keep my dotfiles repo in the same tree structure as the home directory, and loop over the tree to create symlinks.

Depending on the use case, the `/etc/skel` directory (and equivalents depending on the distro/OS) might be useful. When creating a user, the files in $HOME are copied from such "skeleton" directory, and there's usually a way to tell that command to use a different skeleton directory.

So a different way (not better, just different) would be to have a directory already setup with symlinks and all, and use that directory as the skeleton when creating the user, so its $HOME gets created all ready with symlinks and all.