Live data from Hacker News

Dotfiles Management

mitxela.com

71–80 of 143 posts

Re: Dotfiles Management

#71

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

Nix is like sailing from Oakland to San Francisco on an aircraft carrier for your daily commute. Most stuff I care about factors out into .config which I turn into a git repo, push to GitHub and slap on a CI checks for secrets. Most engineers don’t need to forge a demonic pact with the Nix gods who demand I upend and replace everything from my operating system to my wife.

Well, the USS Hornet is stationed right there in Alameda, and it's not being used for anything else... :)

Re: Dotfiles Management

#72
post #52

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

Nix is a huge dependency though, in a lot of sense (have to learn a new programming language rather than invest in your git skills etc.). Even if you are mostly running nixos.

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

Re: Dotfiles Management

#73

Earlier 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…

https://snowflakeos.org/

Re: Dotfiles Management

#74

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

Nix is like sailing from Oakland to San Francisco on an aircraft carrier for your daily commute. Most stuff I care about factors out into .config which I turn into a git repo, push to GitHub and slap on a CI checks for secrets. Most engineers don’t need to forge a demonic pact with the Nix gods who demand I upend and replace everything from my operating system to my wife.

Yes, in that it's military-grade technology that needs to be more accessible to the public. Otherwise I don't agree with your analogy.

Re: Dotfiles Management

#75
As more applications migrate to xdg, I have simply taken to having my .config directory be a git repository.

Inside that directory I have a “dotfiles” subdirectory that has managed versions of my home directory dotfiles which I symlink in.

Re: Dotfiles Management

#76
post #52

Earlier quoted context omitted.

Nix is a huge dependency though, in a lot of sense (have to learn a new programming language rather than invest in your git skills etc.). Even if you are mostly running nixos.

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.

Re: Dotfiles Management

#77

I was unhappy with existing solutions, especially I wanted the ability to handle differences between machines. So I built my own! You're welcome to see if you like it :) https://github.com/SuperCuber/dotter

I've been using dotter for over a year and it's incredible. I use the same dotfiles repo for Mac and Linux, and dotter is super easy to change variables or subscribe a machine to specific configs. Thanks a lot for dotter @Supercuber!

Re: Dotfiles Management

#78

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

My current dotfile management makes heavy, near complete, usage of home-manager. If I want to do a redeployment I can simply install home-manager on a fresh installation, checkout my repository, and perform `nixos-rebuild switch`.

Re: Dotfiles Management

#79
post #10

Earlier 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'm curious about, specifically, which files you (and the sibling commenter) want to manage outside of the home directory. Is it OS package-manager configs? 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…

On macOS I often have the need to place stuff in /Library.

Re: Dotfiles Management

#80

As more applications migrate to xdg, I have simply taken to having my .config directory be a git repository. Inside that directory I have a “dotfiles” subdirectory that has managed versions of my home directory dotfiles which I symlink in.

This is the obvious no-code solution that adds no extra maintenance burden to anyone. And it works with any VCS or tarballs.

I've been using git and tarballs to synchronize my ~/.config across half a dozen hosts.

Post reply on HN