💾 Archived View for jay.scot › rants › 001.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-11-30)
-=-=-=-=-=-=-
Let's be honest here everyone who uses some form of *BSD or Linux knows what 'dotfiles' are these days. It's super common to push your local machines various configuration files to GitHub/GitLab or whatever 3rd party hosted git provider happens to be flavour of the month.
The thing that really annoys me for some reason is the amount of people that use dedicated programs to manage dotfiles. I am not talking about tools such as GNU/Stow that have multiple purposes, or home-grown shell scripts, not my choice but there is nothing wrong them. I am talking about bloated crap such as Ruby gems or even worse some NodeJS application with 100s of dependencies included. Let's look at a few..
AutoDot - "A minimal dotfile manager".
- NodeJS
- 230+ dependencies
- 50+ different maintainers
- https://github.com/ajmalsiddiqui/autodot
DotStow - "manage dotfiles with stow" (stow front-end???)
- NodeJS
- 270+ dependencies
- Spread over 200 maintainers
- https://github.com/codejamninja/dotstow
Homesick - "Your home directory is your castle"
- Ruby
- Requires ruby, bundler, thor, rack (devel)
- git clones to ~/.homesick then symlinks...
- https://github.com/technicalpickles/homesick
These types of apps make my balls scurry back up from where once they came. It's just so completely over-engineered and unnecessary, each to their own I guess. Personally I just use a tool that's already on everyone's machine GNU/Make nice and simple! Below is a basic make file you can use to get start, just update the files and configs values and then run `$ make` and you are good to go!
files := bashrc xinitrc muttrc vimrc Xresources
cfgs := qutebrowser ncmpcpp mpd git mutt
dotfiles := $(shell pwd)
all: link
define symlink_file
ln -fs $(dotfiles)/$(1) ${HOME}/$(2)$(1);
endef
define symlink_dir
ln -fns $(dotfiles)/$(1) ${HOME}/$(2)$(1);
endef
link: @$(foreach f,$(files),$(call symlink_file,$(f),.))
@$(foreach f,$(cfgs),$(call symlink_dir,$(f),.config/))
@echo files linked
.PHONY: all link
Its pretty straight forward and you can't really go wrong with it, in my own personal Makefile I have a few added steps such as adding backing up installed packages list and cron entries. You can find it over on my git repo which might give you a better understanding how it works in the real world.