I used to put a lot of effort into trying to sync dot files. And you know what? I don't see a reason to do it. I only have one work computer and one personal computer.
Dotfiles Management
21–30 of 143 posts
Re: Dotfiles Management
#22Re: Dotfiles Management
#23Dotbot ( https://github.com/anishathalye/dotbot ) has worked extremely well for me. It’s simple to setup, has minimal dependencies, and it is also easy to run arbitrary commands if I want to get tricky with things. I would highly recommend it.
Re: Dotfiles Management
#24Checkout chezmoi, I’ve been using it for a few years and it ticks every box for me - various machines, different configs, scripts, passwords etc https://www.chezmoi.io/
I was interested in chezmoi, but they don't want you[1] managing files outside your home directory which made it a non-starter. I need to manage /etc/ and /usr/local/ too. [1] https://www.chezmoi.io/user-guide/frequently-asked-questions...
This is highly dependent on distro, but for any use-cases where editing /etc/ is the recommendation, I have found that either:
(a) It's a development environment thing (e.g. httpd vhosts) & thus I see it as quite separate to "my dotfiles" (a personal machine env thing): I try my best to manage dev env stuff from project-specific repos wherever I can (i.e. a bash script to dispatch required local /etc/ changes in a repo "./scripts" dir or similar), or otherwise if it's a more significant set of configs, Ansible.
(b) It's a specific app that is recommending doing things the "Wrong Way™". There's often a workaround to get it to use $HOME or $XDG.
(c) It's OS package configs. I've found that things like repo & key installs are well suited to chezmoi run_ scripts. For anything more advanced or esoteric, I guess that may be an exception.
Re: Dotfiles Management
#25I'm a fan of just having my $HOME as a plain git repo with "*" in ~/.gitignore. Having to force add new files is a minor chore but one I'm more than happy to live with.
That's clever, but it also seems like a bit of a hassle. It also seems incredibly non-hermetic and prone to accidental pollution. What about putting all configs into a single git managed directory and using tooling to install the appropriate symlinks?
# Save the repo to `~/.dotfiles`; the `--bare` option prevents Git from making
# a mess of your home directory.
git clone --bare ... ~/.dotfiles
# Set up an alias for this shell session (it's also in ~/.config/aliasrc).
alias dots='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
# Make sure we don't show untracked files in `git status` output.
dots config --local status.showUntrackedFiles no
# Checkout all local files.
# NOTE: This might overwrite existing files, or you might need to stash files
# before proceeding. Look before you leap. If you have an existing setup,
# consider checking out individual files as needed and testing the
# configuration piecemeal, instead of doing a complete checkout.
dots checkout
# Make sure we can access remotes properly. The `--bare` option requires us to
# do this manually.
dots config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
# Make sure we are set up to track the remote `master` branch. Again, this is a
# consequence of cloning with `--bare`.
dots branch --set-upstream-to=origin/master master
dots switch master
# Fetch to make sure everything is configured correctly.
dots fetch originRe: Dotfiles Management
#26I chose to use yadm (http://yadm.io) for no particular reasons beyond that I found it first, and it seemed reasonable. It's more just a wrapper around putting GIT_DIR elsewhere.
Re: Dotfiles Management
#27Earlier quoted context omitted.
It's definitely a gateway drug worth taking since Nix solves all kinds of other problems too. Just don't expect to become an expert overnight, it takes a while to sink in (or it did for me).
It's sad though - there's almost nothing in Nix (in my experience) that has to be that difficult if you know any programming. It's a perfect storm of bad documentation, bad tooling and unintuitive UX. I've been half tempted to try and bridge Nix with some simplified UX. Something resembling blasphemy but nonetheless focused on user experience above all else. At least doing that would be a natural project to learn Nix…
I still don't know if it's worth, I have to experiment a bit more with it.
I have to say I'm still struggling with the flake:/
Re: Dotfiles Management
#28 ~/.dotfiles
Really? Just as so many utilities are finally moving away from `~/.foo` to `$XDG_CONFIG_DIR/foo` (default `~/.config/foo`) to reduce home directory pollution, does a new tool have to start using `~/.foo`?Heck, even the `dot` output demo'd by TFA shows 8 legacy `~/.foo` files, but 10 `~/.config/foo(/bar)*` files. (But is missing `~/.dotfiles`?!)
Re: Dotfiles Management
#29Earlier quoted context omitted.
I was interested in chezmoi, but they don't want you[1] managing files outside your home directory which made it a non-starter. I need to manage /etc/ and /usr/local/ too. [1] https://www.chezmoi.io/user-guide/frequently-asked-questions...
I've been using chezmoi too and this is the only feature I miss. It'd be interesting to know what solutions folks are using. Chezmoi has some discussions around it, mostly recommending to use run scripts.
Re: Dotfiles Management
#30I've written simple encrypt/decrypt with PGP, but since I've kinda lost trust into Keybase I have no simple way to bootstrap PGP.