#installer #dotfiles #config

app dotconfig

A tool for symlinking configuration files from a central repository to their respective locations on the system in a repeatable, configurable way

4 releases

0.2.0 Sep 12, 2022
0.1.2 Jan 14, 2022
0.1.1 Jan 5, 2022
0.1.0 Jan 5, 2022

#49 in #dotfiles

MIT/Apache

17KB
297 lines

Dotconfig

A tool for symlinking configuration files from a central repository to their respective locations on the system in a repeatable, configurable way.

Install

Using cargo:

cargo install dotconfig

Using a package manager:

  • Archlinux (yay or another AUR helper will also work)
paru -S dotconfig

Configuration

By default dotconfig will look for the directory ~/.cfg, which is assumed to contain all of your dotfiles as well as symlinks.yml, which is a listing of all of the desired symlinks you would like dotconfig to make for you.

The format of symlinks.yml should be as follows:

links:
  - link:
    path: ~/.zshrc
    origin: zshrc
  - link:
    path: ~/.config/alacritty/alacritty.yml
    origin: alacritty-config.yml
# ...

In this example, dotconfig would create the following two symlinks:

~/.zshrc -> ~/.cfg/zshrc
~/.config/alacritty/alacritty.yml -> ~/.cfg/alacritty-config.yml

Usage

dotconfig [OPTIONS]

Options

-c, --config <CONFIG>    Specify the YAML file that lists your desired symlinks [default: symlinks.yml]
-d, --dir <DIR>          Specify the directory that holds your config files [default: $HOME/.cfg]
-h, --help               Print help information
-V, --version            Print version information

Example usage

In the following example, dotconfig will read ~/my-dotfiles/links.yml, and all links will be made to the ~/my-dotfiles directory.

dotconfig -d ~/my-dotfiles -c links.yml

Dependencies

~3.5–5MB
~89K SLoC