JasonYao / DEPRECATED-dotfiles

Dotfiles to run upon a clean install of a system
GNU General Public License v3.0
1 stars 1 forks source link

Overhauled dotfiles #36

Open JasonYao opened 6 years ago

JasonYao commented 6 years ago

I'll stick the new code in a new repo and mark this one as deprecated when I'm done.

Requirements

Basically, this is to list out what I'm trying to do for my new set of dotfiles

Possible Approaches

With that in mind, one way to do it would be as a python package that I'd publish to pypi. It'd have the extra benefit of teaching me everything i need to publish my own python libraries in general, and have it be widely available whenever I need it.

The question really is what to do about applications and libraries that need to be installed. Possible way to break it down:

Commands to contain:

General Flow

JasonYao commented 6 years ago

Notes

JasonYao commented 6 years ago

Structure

The new dotfiles repo's structure should be something like:

.
├── CHECKLIST.md
├── LICENSE
├── README.md
├── start-opinionated <- Bootstrap script that will install pyenv and good environments, then call the start script
├── start <- Bootstrap script that will install via a pre-installed python 3 environment
├── pydotfiles <- Package for the pydotfiles library
│   └── Actual code for pydotfiles that installs the dotfiles
└── git <- contains a directory of git scripts
    └── pre-push <- script to run before every push
JasonYao commented 6 years ago

Flows

Install

Completely new computer

curl -s https://raw.githubusercontent.com/JasonYao/pydotfiles/master/start-opinionated | bash -s {CONFIGURATION_REPO_GIT_LINK}
# e.g.
curl -s https://raw.githubusercontent.com/JasonYao/pydotfiles/master/start-opinionated | bash -s git@github.com:JasonYao/dotfiles.git

Established computer with a working python 3.6+ environment

pip install pydotfiles
pydotfiles install {CONFIGURATION_REPO_GIT_LINK}

# e.g.
pydotfiles install git@github.com:JasonYao/dotfiles.git  # Git repo containing a config.json or config.yaml

Upgrade

# Updates all dependencies via the host package manager
pydotfiles update

Clean

# Cleans out the dotfiles cache and the package manager cache
pydotfiles clean

Uninstall

# Uninstalls all modules
pydotfiles uninstall all

# Uninstalls specific modules
pydotfiles uninstall git  # Uninstalls git settings
pydotfiles uninstall ssh  # Uninstalls SSH settings
pydotfiles uninstall defaults  # Uninstalls host settings to factory defaults
pydotfiles uninstall dependencies  # Uninstalls dependencies via host package manager
pydotfiles uninstall env  # Uninstalls environment managers like rbenv, jenv, pyenv
pydotfiles uninstall terminal  # [MacOS only] Uninstalls the terminal and its settings