One of my most favourite things about open source files on GitHub is the ability to see how others do (what some people might call) mundane things,...
For further actions, you may consider blocking this person and/or reporting abuse
Next level would be porting it to an orchestration tool like Ansible, Puppet, Chef or Salt. They include modules to integrate with everything under the sun. It would be a good learning experience and the skills would be transferable to DevOps roles. With these tools, a well designed script could rebuild your system on any distro, regardless of whether it's using apt/dpkg, yum/rpm or something else.
I recommend using
stow
for that kind of installation (symlinking to your dotfiles).I’ve tried out
stow
before, and found even that to be more overhead than I needed to manage my (relatively small, I’ll concede) dotfiles collection. If I recall correctly,stow
looks for the files in the same folder structure in the source that it then links to the destination. I found that just writing my own symlink and specifying the destination once was easier than remembering where the dotfile is in the file structure. I’m sure it makes sense for larger installations or ones with more programs than mine, though!That is a very interesting post. Thank you for writing it.
I have a note where I gather all the tools and installation when I am setting up a new Linux or Mac machine.
I planned to create some script to automate it but never started it.
I definitely must do it.
Some time ago I realized that I can write notes of this nature as scripts, or at least, close to. So now I try to start there whenever possible. Documentation is automation!
Defintely. :-)
I had to laugh when this came across my feed this morning, as I just figured part of this out on my own and started doing it just last week (symlinking my dotfiles). I never thought about the rest though. Thanks for the tip!
Great timing! :D Try not to lose too many hours to it, like I did at first ^^;
Very interesting! It reminds me a bit of a project of my own: github.com/Sebbestune/DebConf where I try to also have a way to automatically configure my Debian machines with just a script. If anyone wants to take inspiration from a vimrc here is mine too: gist.github.com/Sebbestune/40b7392... (I'm planning to put it in a dedicated git repo soon). :)
Very inspirational since I have three servers I need to get set up in the next few days! This is a great reminder to try automating things!
Also, to anyone who tries something like this, remember that your dotfiles can contain sensitive information! You may need to strip information out of your files and have a private script not hosted publicly that you can use for the sensitive information. If you're feeling bold, you could try to set up a build process that grabs the secrets from another file, environment variables, Hashicorp Vault, probably all sorts of solutions I can't think of and puts them back into the files while orchestrating your scripts!
Symlinks on symlinks 😂 Good luck with the server setups!
Brilliant post! Thanks a lot!
Oh no kidding. Although the encryption feature is neat.
Links to your GitHub scripts throw 404 errors
I wonder if it would be because I forgot to make it public.
(Thanks! Glad someone’s paying attention.)
Nice post! I want to do something similar in Ansible, but I like the bash approach you did.