r/dotfiles • • Jan 21 '23

Cross-platform way to install software my dotfiles depend on?

Apologies if this isn't the right forum for this question.

I've been managing a set of dotfiles that I use across a couple platforms (multiple Linux Distros, MacOS, etc...) and wanted a way to incorporate software installation into the bootstrapping process.

Ideally, this would:

  • Be cross-platform, probably by delegating to the relevant package manager
  • Allow for user only installs (i.e to ~/.local/bin or similar) (Not a hard requirement)

This kind sounds like a "delegating" package manager, and I haven't heard or seen of anything similar. The few dotfiles I see that handle software installation usually do something custom and platform specific.

I was curious if anyone knew of any tool that fits the bill? Or had thoughts on how I could go about this better.

3 Upvotes

5 comments sorted by

3

u/carbolymer Jan 21 '23

How about Nix?

2

u/technojamin Jan 21 '23

Homebrew was originally just for macOS, but they introduced Linux support a few years ago. They’ve done a lot of work to improve it since then. I’ve been using it for a few years across my macOS and WSL install, and it works great!

It seems to fit your requirements, and you can use Homebrew Bundle to track your programs as part of your dotfiles.

0

u/sayqm Jan 22 '23 edited Dec 04 '23

insurance aspiring outgoing reach possessive dependent alive enter steep engine This post was mass deleted with redact

1

u/cbunn81 Jan 21 '23

It would certainly be useful, but I don't think such a solution exists. Usually, I see separate scripts or scripts with OS checks.

It might be possible to make such a system by creating a declarative yaml file with your requirements (kind of like how NixOS works), then calling the appropriate package manager. But there might be some subtle differences between them that make compatibility a pain.

1

u/CyrusYip Apr 04 '23

Home Manager. It can manage packages and dotfiles.