Live data from Hacker News

Dotfiles Management

mitxela.com

91–100 of 143 posts

Re: Dotfiles Management

#91
post #30

How do people here handle secrets like e.g. passwords / env variables / ssh keys in their dotfiles? I've written simple encrypt/decrypt with PGP, but since I've kinda lost trust into Keybase I have no simple way to bootstrap PGP.

I use git-crypt with VCSH for dotfiles and Ansible for provisioning, using Ansible's built-in encryption for some data. It works pretty well, but to make things less annoying, I prompt for decrypt passwords up front and if typo it, you won't know until much later when bringing a machine up from scratch.

Re: Dotfiles Management

#92
post #67

Earlier quoted context omitted.

settled on this as well because of its very good cross-platform support. Only thing that took some time getting used to was the model of having a source directory distinct from your actual dotfiles unlike most of the symlink based tools.

Fair point. If you're interested in why chezmoi took this particular approach, I wrote a few FAQs on its design: Why chezmoi doesn't use symlinks: https://www.chezmoi.io/user-guide/frequently-asked-questions... General design FAQs: https://www.chezmoi.io/user-guide/frequently-asked-questions...

That's honestly very helpful. I wasn't aware of edit.watch which is pretty much what I wanted.

Re: Dotfiles Management

#93

I always start out with the best of intentions for dotfile mangement etc, using tools like stow, git and so on. Eventually I get lazy and don't bother checking stuff in and forget where half of the stuff is. Might try this solution but I'm too cynical to think it'll be something I'll stick with

It's useful if you have a second machine or even work machine where you want to keep your bash profile, IDE settings, etc. in sync.

Re: Dotfiles Management

#94
post #39

At our startup (FluxNinja), we provide MacBooks and Linux Desktops (System76) to our engineering staff. We have invested in common dotfiles[0] to help them keep dev experience consistent across machines. We use chezmoi for dotfiles management. Really recommend investing in common dotfiles at the organization level. For young developers, a standard setup provides a big productivity boost. [0] https://github.com/fluxni…

How is Chezmoi compared to Stow? Currently using Stow but Chezmoi seems to be interesting.

Re: Dotfiles Management

#95

Checkout 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/

been using chezmoi for the past 3 months across 4 machines. i like the template support, but i constantly feel like there's complexity hiding. im finding myself needing to relearn various bits of how it works after not touching it for a few weeks at a time.

by far, my favorite thing about chezmoi is that you're managing a separate set of files and syncing then to your homedir, making it reallllllly easy to switch tools or otherwise do something else.

its better than the home-rolled symlink solution i was using before it, and certainly better than some of these turn-your-home-dir-into-a-git-repo solutions.

but if im being honest, i hate every one of these tools in different ways. i dont have the answer, but i feel like im endlessly searching for something that feels like the right balance of simple and flexible.

anybody wanna join my dotfiles-aas startup?

Re: Dotfiles Management

#96
From this HN comment from 2016 https://news.ycombinator.com/item?id=11071754

I use:

    git init --bare $HOME/.myconf

    alias config='/usr/bin/git --git-dir=$HOME/.myconf/ --work-tree=$HOME'

    config config status.showUntrackedFiles no
where my ~/.myconf directory is a git bare repository. Then any file within the home folder can be versioned with normal

commands like:

    config status

    config add .vimrc

    config commit -m "Add vimrc"

    config add .config/redshift.conf

    config commit -m "Add redshift config"

    config push
And so one…

No extra tooling, no symlinks, files are tracked on a version control system, you can use different branches for different computers, you can replicate you configuration easily on new installation.

Re: Dotfiles Management

#97
post #76

Earlier quoted context omitted.

It's a one time investment though, and the payback is huge.

I'd like to agree, but my experience has been different. Basically... 1. invest a lot of time in learning nix (nixos in my case) 2. set up a system that works great 3. a year or two go by 4. need to make a change, modification, or set up another system 5. relearn everything from step 1 That said, I really do like the system. Just wish it were more user friendly and better documented.

If you are only changing your system once ever year or two, then perhaps it's not for you.

I'm running nix-build daily...

Re: Dotfiles Management

#98

I do something similar, albeit a bit more bare-bones. I keep my dotfiles in a dotfiles folder that is a git repo and then just have a simple script to symlink everything. I have a couple of submodules in there (zplug, pyenv) and a bash script to keep them up to date, and then a few self managed binaries, like fnm. That's about it. I don't bother trying to manage anything outside of home or deal with secret values by…

Stow (https://www.gnu.org/software/stow/) may be useful for the linking part

Re: Dotfiles Management

#99
Is there a name for oft-repeating content/post and the overall discussion on a given topic (dotfile management in this case) on HN?

I am not complaining about the repeat. It’s just that I find it very amusing to see different people kinda-sorta reinventing the wheel (and discussing the nuts and bolts) again.

Post reply on HN