001.txt - gopherhole - My gopherhole source code.
 (HTM) git clone git://jay.scot/gopherhole
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
       001.txt (2412B)
       ---
            1 [jay.scot]
            2 [001]
            3 
            4 
            5 --[ So much bloat around dotfiles
            6 
            7 
            8 Let's be honest here everyone who uses some form of *BSD or Linux knows
            9 what 'dotfiles' are these days. It's super common to push your local
           10 machines various configuration files to GitHub/GitLab or whatever 3rd
           11 party hosted git provider happens to be flavour of the month.
           12 
           13 The thing that really annoys me for some reason is the amount of people
           14 that use dedicated programs to manage dotfiles. I am not talking about
           15 tools such as GNU/Stow that have multiple purposes, or home-grown shell
           16 scripts, not my choice but there is nothing wrong them. I am talking
           17 about bloated crap such as Ruby gems or even worse some NodeJS
           18 application with 100s of dependencies included. Let's look at a few..
           19 
           20         AutoDot - "A minimal dotfile manager".
           21           - NodeJS
           22           - 230+ dependencies
           23           - 50+ different maintainers
           24           - https://github.com/ajmalsiddiqui/autodot
           25 
           26         DotStow - "manage dotfiles with stow" (stow front-end???)
           27           - NodeJS
           28           - 270+ dependencies
           29           - Spread over 200 maintainers
           30           - https://github.com/codejamninja/dotstow
           31 
           32         Homesick - "Your home directory is your castle"
           33           - Ruby
           34           - Requires ruby, bundler, thor, rack (devel)
           35           - git clones to ~/.homesick then symlinks...
           36           - https://github.com/technicalpickles/homesick
           37 
           38 These types of apps make my balls scurry back up from where once they
           39 came.  It's just so completely over-engineered and unnecessary, each to
           40 their own I guess. Personally I just use a tool that's already on
           41 everyone's machine GNU/Make nice and simple! Below is a basic make file
           42 you can use to get start, just update the files and configs values and
           43 then run `$ make` and you are good to go!
           44 
           45 
           46         files := bashrc xinitrc muttrc vimrc Xresources
           47         cfgs := qutebrowser ncmpcpp mpd git mutt
           48         dotfiles := $(shell pwd)
           49 
           50         all: link
           51 
           52         define symlink_file
           53                 ln -fs $(dotfiles)/$(1) ${HOME}/$(2)$(1);
           54         endef
           55 
           56         define symlink_dir
           57                 ln -fns $(dotfiles)/$(1) ${HOME}/$(2)$(1);
           58         endef
           59 
           60         link: @$(foreach f,$(files),$(call symlink_file,$(f),.))
           61         @$(foreach f,$(cfgs),$(call symlink_dir,$(f),.config/))
           62         @echo files linked
           63 
           64         .PHONY: all link
           65 
           66 
           67 Its pretty straight forward and you can't really go wrong with it, in my
           68 own personal Makefile I have a few added steps such as adding backing up
           69 installed packages list and cron entries. You can find it over on my git
           70 repo which might give you a better understanding how it works in the
           71 real world.
           72 
           73 .EOF