Live data from Hacker News

Dotfiles Management

mitxela.com

81–90 of 143 posts

Re: Dotfiles Management

#82
Hourly snapshots for history.

I hardly ever need to sync things between machines since vscode manages that itself.

I get why some people need this but it's a net time sync for a lot of people that probably don't need it.

Willing to bet it's mostly due to a lack of backups and ability to restore them to a new machine when you upgrade.

One nice thing about this is that you can keep a central repo for multiple machines and use branches with rebase and merge to sync changes while keeping specific differences separate.

Re: Dotfiles Management

#83
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.

Well, step 3 just shows how great it is.

But ideally no year will go by without using it, because you do install it to another system, tweak your home config, etc. The same way one doesn’t forget most of git, even though that one has some arcane UX.

Re: Dotfiles Management

#84
post #42

Earlier quoted context omitted.

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

Honestly, it really is not the language that’s the problem. While there are a few cases where it can trip you up at first, you wouldn’t be singing package descriptors even if it were Python — it simply has a business domain which is non-trivial. This non-triviality and organic growth show on the standard library of nix packages, but I fail to see how a lisp language or whatever be immune to it, besides having learned from some early abstractions mistakes.

Re: Dotfiles Management

#85
post #32

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

For me the killer feature of home-manager versus other dotfiles managers is that it also installs any software your dotfiles depend on or assume to be present on the machine.

To me it is marking what is “garbage” vs what isn’t in the .config folder. I like to experiment on linux a lot, like switching to plasma and back to Gnome and it always leaves like 20 mostly-empty folders trashed. I can then just remove the folder and go on my way with home-manager.

Re: Dotfiles Management

#86

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.

Learning Nix just do manage your dotfiles*, yes.

But, now that you're using Nix, ... you could use Nix to describe an OS setup, write Docker images, declare the tooling for a dev environment, etc.

Re: Dotfiles Management

#87

Earlier quoted context omitted.

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/

[deleted]

Re: Dotfiles Management

#88
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'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.

I've partially adopted `aconfmgr` for the other stuff, but haven't put in the effort to refine my config, partly because I only have one applicable (arch-based) system at the moment.

Re: Dotfiles Management

#89

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

Any home-manager users on NixOS here? Are there any killer features in home-manager for you? I tried home-manager for a bit, but just went back to plain NixOS after I couldn't find anything it did better than what I was already using ([1], [2]).

[1] https://gitlab.com/engmark/tilde

[2] https://gitlab.com/engmark/root

Post reply on HN