Live data from Hacker News

Dotfiles Management

mitxela.com

41–50 of 143 posts

Re: Dotfiles Management

#41
post #21

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.

What happens when one of those computers blows up and you need to get back to being productive quickly?

Not the person you asked, but if that happens I restore from backup.

Re: Dotfiles Management

#42

Nice hack, but I still believe that home-manager [0] should be the way to go. It's the gateway drug to the Nix ecosystem and cleanly solves the composability problem which this "one-size-fits-all repo checked out to root" approach will have some trouble with. [0] https://github.com/nix-community/home-manager

the read has “words of warning” almost immediately at the top about being familiar with nix first. it’s the gateway drug to nix? bad docs and difficult to grok error messages seem to be a consistent theme that comes up learning nix.

You're only likely to screw things up once you start digging deeper into the Nix language/stdlib. I was put off by the warning at first as well, but it's honestly awesome having functional dotfiles that work reasonably consistently across NixOS (personal)/Ubuntu (work)/MacOS (work).

> bad docs

Yeah, pretty damned awful.

> error messages

That too.

I honestly think that inventing a language was a huge mistake. Guix took a much more sensible approach, but a libre kernel is unusable for 99.9999% of people.

Re: Dotfiles Management

#44
post #33
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.

Pass: https://wiki.archlinux.org/title/Pass Emacs uses .authinfo transparently: https://www.reddit.com/r/emacs/comments/7jhcq8/authinfogpg/

Emacs' auth-source.el can work directly with the macOS keychain, which if you're on a Mac is pretty useful.

Re: Dotfiles Management

#45
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…

Interesting, thanks for sharing. Two questions:

Does this make a backup of an existing set of .files?

Does this also install required packages using brew?

Re: Dotfiles Management

#46
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…

Interesting, thanks for sharing. Two questions: Does this make a backup of an existing set of .files? Does this also install required packages using brew?

1. It doesn't do a good job in making a backup of existing files as it's meant to be setup on a new machine. However, the setup script can be quickly modified to backup existing files. See [0].

2. Yes, it installs required packages via brew both on macOS and Linux. See [1].

[0] https://github.com/fluxninja/dotfiles/blob/master/sw/assets/...

[1] https://github.com/fluxninja/dotfiles/blob/master/sw/bin/exe...

Re: Dotfiles Management

#47

~/.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`?!)

This isn't a new tool. It is just a single convenient shell alias for any file on the system with git. You can put the repo in $XDG_CONFIG_DIR/dotfiles or wherever you want. ~/.dotfiles is just a common place to put that repo.

Re: Dotfiles Management

#48

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.

I used to run several VMs for several projects, and it was convenient. But now I really just have a single work project, and don't really code on my personal computer. So I no longer need it.

Re: Dotfiles Management

#49
post #26

I very recently put some effort into tidying up my dotfiles, and have a brief writeup at https://chatwithsysop.com/blog/2022/12/31/dotfiles-cleanup (none of this was done with the academic rigor required to withstand a deconstruction by HN, it is just a log of one person's experience with a weekend project). I chose to use yadm ( http://yadm.io ) for no particular reasons beyond that I found it first, and it seemed r…

I can't say enough good things about yadm. I found a yadm bug under Cygwin years ago, and the author had a patch for me within a day. I'll grant that Cygwin is an odd platform.

I use yadm to manage dotfiles across Windows (via Cygwin), macOS, and Linux.

Re: Dotfiles Management

#50
This isnt a vcs based solution, but I've been using syncthing to track my configs, with the help of a small home server. The bonus is that it automatically synchronises my work and personal laptops without me needing to do anything
Post reply on HN