Live data from Hacker News

Dotfiles Management

mitxela.com

51–60 of 143 posts

Re: Dotfiles Management

#51
I moved away from using a dotfiles repo a few years ago because I kept forgetting to add/commit files as I changed them.

Instead I use mackup[0] which automatically manages symlinks to your Dropbox/Drive/Share and has support for a huge amount of software by default. You can also manually add “extra” files you wish to track if you like.

[0] https://github.com/lra/mackup

Re: Dotfiles Management

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

Re: Dotfiles Management

#53

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

Exactly the same for me, at some point I realized that just copying over some config files from a backup is easier than trying to keep things neat and tidy for years just to be prepared for setting up a new computer every few years.

Re: Dotfiles Management

#54

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.

Re: Dotfiles Management

#55
I have a similar system: I manage my dot files and a bunch of other configs by placing a git repository in my operating system's root directory, i.e. file:///.git. I use a .gitignore file to exclude most things from consideration while adding things to git. Transferring to another OS is as simple as copying the .git dir over.

Re: Dotfiles Management

#57
post #55

I have a similar system: I manage my dot files and a bunch of other configs by placing a git repository in my operating system's root directory, i.e. file:///.git. I use a .gitignore file to exclude most things from consideration while adding things to git. Transferring to another OS is as simple as copying the .git dir over.

Before your comment I never considered the inverse of .gitignore but apparently it’s very easy to do! https://stackoverflow.com/questions/987142/make-gitignore-ig...

Re: Dotfiles Management

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

You can use chezmoi to manage files outside your home directory if you really want to.

For an example, see https://github.com/felipecrs/dotfiles:

The `home` directory contains home directory files.

The `root` directory contains root directory files (e.g `/etc`).

Post reply on HN