Automatic syncing of desktop files to git
 
 
 
Go to file
Joshua Potter 4fa6654423 Separate path module and a normalized newtype. 2021-12-30 16:42:01 -05:00
.githooks Read in config file or search appropriate places. 2021-12-29 11:06:25 -05:00
examples Various cleanup and daemon template. 2021-12-30 09:58:59 -05:00
src Separate path module and a normalized newtype. 2021-12-30 16:42:01 -05:00
.envrc Basic project template. 2021-12-28 17:06:17 -05:00
.gitignore Basic project template. 2021-12-28 17:06:17 -05:00
Cargo.toml First draft on a daemon instance. 2021-12-30 13:18:52 -05:00
README.md Separate path module and a normalized newtype. 2021-12-30 16:42:01 -05:00
flake.lock Basic project template. 2021-12-28 17:06:17 -05:00
flake.nix Various cleanup and daemon template. 2021-12-30 09:58:59 -05:00

README.md

homesync

Caution! This is a work in progress and far from complete!

Introduction

Homesync provides a way of automatically syncing config files across various applications you may use. It works by establishing a file watcher on all the configs specified in the primary homesync config. As files are changed, they are copied to a local git repository to eventually be pushed by the user. Likewise, at any point, the user can sync against the remote repository, overwriting local configurations for one or more packages.

Installation

TODO

Configuration

Homesync uses a YAML file, to be found in anyone of the following locations. Locations are searched in the following priority:

  • $HOME/.homesync.yml
  • $HOME/.config/homesync/homesync.yml
  • $XDG_CONFIG_HOME/homesync.yml
  • $XDG_CONFIG_HOME/homesync/homesync.yml

That said, it is recommended to modify this config solely from the exposed homesync CLI. Homesync will take responsibility ensuring the generated configuration is according to package manager, platform, etc.

Usage

Verify your installation by running homesync from the command line. If installed, you will likely want to initialize a new config instance. Do so by typing:

$ homesync init

You can then walk through what github repository you want to sync your various files with. You can have homesync automatically monitor all configuration files and post updates on changes by running

$ homesync daemon

As changes are made to your homesync config or any configuration files referred to within the homesync config, the daemon service will sync the changes to the local git repository. To push these changes upward, run

$ homesync push --all

which will expose a git interface for you to complete the push. Lastly, to sync the remote configurations to your local files, run

$ homesync pull --all

This will load up a diff wrapper for you to ensure you make the changes you'd like.

Contribution

Install git hooks as follows:

git config --local core.hooksPath .githooks/