NICHTJ3 / Dotsy

A dotfile manager inspired by dotbot
https://crates.io/crates/dotsy
MIT License
0 stars 0 forks source link

Allow profiles and config discovery with globs? #11

Open NICHTJ3 opened 2 years ago

NICHTJ3 commented 2 years ago

Currently profiles and configs can only live directly in the configured directory e.g. ~/Dotfiles/configs/example.config.json. This isn't super practical as you end up with a file structure something like the following

/configs/
  /example/
    ... config files
  /example.config.json

rather than something like the follow

/configs/
  /example/
    ... config files
    /example.config.json

The idea would be to allow config and profile directories to be configured with globs e.g.

{
  "dotfiles": "~/dotfiles/",
  "profiles_dir": "profiles/*/*.profile.json",
  "configs_dir": "configs/*/*.config.json",
  "package_add_command": "brew add {}",
  "package_remove_command": "brew remove {}"
}
NICHTJ3 commented 4 days ago

While adding more info to this issue. I've started leaning away from this as a solution.

Keeping config files in the directory associated with the config will likely just lead to confusion when it comes to what's a dotfile and what's dotsy config

Either that or it'll cause you to nest further. Maybe that's nicer 🤔

/configs/
  /example/
    /config/
        ... config files
    /example.config.json

I'll have a think about it