Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 Ideas #20

Open
evanpurkhiser opened this issue Jun 20, 2015 · 0 comments
Open

V2 Ideas #20

evanpurkhiser opened this issue Jun 20, 2015 · 0 comments

Comments

@evanpurkhiser
Copy link
Owner

evanpurkhiser commented Jun 20, 2015

I've had some ideas bouncing around in my head about a updated version of this tool that's hopefully just as powerful, but even easier to configure and more manageable. Here's some ideas I wanted to write down:

Configurations stored in the repository

Right now when you want to setup your dotfiles on a machine you have to decide all of what groups you want to be installed. If you have more than a few groups this can be annoying to manage. Why not put this part of the configuration in version control?

My thought would be to have a dots.yml (or json possibly) file in the root of your ~/.local/etc/ dotfiles clone that has some configuration for that set of dotfiles along with some other global configurations for the dotfile repository itself. My current configurations would look something like this

# Prefix to use for explicit append points
append_prefix: '!!@@'

# The file suffix used for override files
override_suffix: override

# Compilation installation path.
# Supports environment variable expansions using ${VARIBLE}
install_path: ${HOME}/.config

groups:
  - base
  - machines/desktop
  - machines/work-laptop
  - common/work-system

# Groups to compile for all profiles
base_groups: [ base ]

# Configuration profiles. Each configuration profile should map to a list of
# source paths to compile. Order defines the cascade order.
config_profiles:
  desktop:
    - common/graphical
    - common/pulseaudio
    - machines/desktop
  macbook:
    - common/osx-homebrew
    - machines/macbook
  work-macbook:
    - common/osx-homebrew
    - common/work-system
  work-vm:
    - common/work-system

Something like dots config set desktop would select the desktop configuration.

Configuration lockfile

Right now it can be a little frustrating to test some new configuration files only to remove them from your source later and then find that they're still cluttering your configuration installation directory. This can be especially annoying when they have some continued configuration side effect.

Inspired by library package managers I had the idea of a 'dots/lockfile' which would be installed with the compiled files.

{
    "profile": "desktop",
    "installed_files": [
        "/home/evan/.config/bash/bashrc"
        "/home/evan/.config/git/config",
        "/home/evan/.config/termite/config",
    ]
}

This will simply allow us to know what files were installed previously so that we can know what files are no longer needed and can be removed.

Other things

  • Better verbose output. It should say exactly what it's doing.
  • TESTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant