mirror of
https://github.com/correl/correl.github.io.git
synced 2024-12-29 11:09:24 +00:00
Syncing Files
Change-Id: I7d7ab90a32f3eda281ae01a8948721149a9f6e77
This commit is contained in:
parent
f1dda5c521
commit
59d7df0c3b
2 changed files with 178 additions and 0 deletions
102
_posts/2015-04-20-syncing.html
Normal file
102
_posts/2015-04-20-syncing.html
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
---
|
||||||
|
title: Keeping Files And Configuration In Sync
|
||||||
|
author: Correl Roush
|
||||||
|
---
|
||||||
|
<p>
|
||||||
|
I have a few computers I use on a daily basis, and I like to keep the
|
||||||
|
same emacs and shell configuration on all of them, along with my org
|
||||||
|
files and a handful of scripts. Since I'm sure other people have this
|
||||||
|
problem as well, I'll share what I'm doing so anyone can learn from
|
||||||
|
(or criticise) my solutions.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div id="outline-container-sec-1" class="outline-2">
|
||||||
|
<h2 id="sec-1">Git for configuration and projects</h2>
|
||||||
|
<div class="outline-text-2" id="text-1">
|
||||||
|
<p>
|
||||||
|
I'm a software developer, so keeping things in git just makes sense
|
||||||
|
to me. I keep my org files in a privately hosted git repository, and
|
||||||
|
<a href="https://www.gnu.org/software/emacs/">Emacs</a> and <a href="http://www.zsh.org/">Zsh</a> configurations in a <a href="https://github.com/correl/dotfiles">public repo on github</a>. My blog is
|
||||||
|
also hosted and published on github as well; I like having it cloned
|
||||||
|
to all my machines so I can work on drafts wherever I may be.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
My <a href="https://github.com/correl/dotfiles/blob/master/.zshrc">.zshrc</a> installs <a href="https://github.com/robbyrussell/oh-my-zsh">oh-my-zsh</a> if it isn't installed already, and sets
|
||||||
|
up my shell theme, path, and some other environmental things.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
My <a href="https://github.com/correl/dotfiles/blob/master/.emacs.d/emacs.org">Emacs configuration</a> behaves similarly, making use of John
|
||||||
|
Wiegley's excellent <a href="https://github.com/jwiegley/use-package">use-package</a> tool to ensure all my packages are
|
||||||
|
installed if they're not already there and configured the way I like
|
||||||
|
them.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
All I have to do to get running on a new system is to install git,
|
||||||
|
emacs and zsh, clone my repo, symlink the files, and grab a cup of
|
||||||
|
tea while everything installs.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="outline-container-sec-2" class="outline-2">
|
||||||
|
<h2 id="sec-2">Bittorrent sync for personal settings & books</h2>
|
||||||
|
<div class="outline-text-2" id="text-2">
|
||||||
|
<p>
|
||||||
|
For personal configuration that doesn't belong in and/or is too
|
||||||
|
sensitive to be in a public repo, I have a folder of dotfiles and
|
||||||
|
things that I sync between my machines using <a href="https://www.getsync.com/">Bittorrent Sync</a>. The
|
||||||
|
dotfiles are arranged into directories by their purpose:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre class="example">
|
||||||
|
[correlr@reason:~/dotenv]
|
||||||
|
% tree -a -L 2
|
||||||
|
.
|
||||||
|
├── authinfo
|
||||||
|
│ └── .authinfo.gpg
|
||||||
|
├── bin
|
||||||
|
│ └── .bin
|
||||||
|
├── emacs
|
||||||
|
│ ├── .bbdb
|
||||||
|
│ └── .emacs.local.d
|
||||||
|
├── mail
|
||||||
|
│ ├── .gnus.el
|
||||||
|
│ ├── .signature
|
||||||
|
├── README.org
|
||||||
|
├── .sync
|
||||||
|
│ ├── Archive
|
||||||
|
│ ├── ID
|
||||||
|
│ ├── IgnoreList
|
||||||
|
│ └── StreamsList
|
||||||
|
├── tex
|
||||||
|
│ └── texmf
|
||||||
|
├── xmonad
|
||||||
|
│ └── .xmonad
|
||||||
|
└── zsh
|
||||||
|
└── .zshenv
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This folder structure allows my configs to be easily installed using
|
||||||
|
<a href="https://www.gnu.org/software/stow/">GNU Stow</a> from my <code>dotenv</code> folder:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre class="example">
|
||||||
|
stow -vvS *
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Running that command will, for each file in each of the directories,
|
||||||
|
create a symlink to it in my home folder if there isn't a file or
|
||||||
|
directory with that name there already.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Bittorrent sync also comes in handy for syncing my growing <a href="http://calibre-ebook.com/">Calibre</a> ebook
|
||||||
|
collection, which outgrew my <a href="https://www.dropbox.com/">Dropbox</a> account a while back.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
76
_posts/2015-04-20-syncing.org
Normal file
76
_posts/2015-04-20-syncing.org
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
#+TITLE: Keeping Files And Configuration In Sync
|
||||||
|
#+DATE: <2015-04-20 Mon>
|
||||||
|
#+OPTIONS: toc:nil num:nil
|
||||||
|
|
||||||
|
I have a few computers I use on a daily basis, and I like to keep the
|
||||||
|
same emacs and shell configuration on all of them, along with my org
|
||||||
|
files and a handful of scripts. Since I'm sure other people have this
|
||||||
|
problem as well, I'll share what I'm doing so anyone can learn from
|
||||||
|
(or criticise) my solutions.
|
||||||
|
|
||||||
|
* Git for configuration and projects
|
||||||
|
|
||||||
|
I'm a software developer, so keeping things in git just makes sense
|
||||||
|
to me. I keep my org files in a privately hosted git repository, and
|
||||||
|
[[https://www.gnu.org/software/emacs/][Emacs]] and [[http://www.zsh.org/][Zsh]] configurations in a [[https://github.com/correl/dotfiles][public repo on github]]. My blog is
|
||||||
|
also hosted and published on github as well; I like having it cloned
|
||||||
|
to all my machines so I can work on drafts wherever I may be.
|
||||||
|
|
||||||
|
My [[https://github.com/correl/dotfiles/blob/master/.zshrc][.zshrc]] installs [[https://github.com/robbyrussell/oh-my-zsh][oh-my-zsh]] if it isn't installed already, and sets
|
||||||
|
up my shell theme, path, and some other environmental things.
|
||||||
|
|
||||||
|
My [[https://github.com/correl/dotfiles/blob/master/.emacs.d/emacs.org][Emacs configuration]] behaves similarly, making use of John
|
||||||
|
Wiegley's excellent [[https://github.com/jwiegley/use-package][use-package]] tool to ensure all my packages are
|
||||||
|
installed if they're not already there and configured the way I like
|
||||||
|
them.
|
||||||
|
|
||||||
|
All I have to do to get running on a new system is to install git,
|
||||||
|
emacs and zsh, clone my repo, symlink the files, and grab a cup of
|
||||||
|
tea while everything installs.
|
||||||
|
|
||||||
|
* Bittorrent sync for personal settings & books
|
||||||
|
|
||||||
|
For personal configuration that doesn't belong in and/or is too
|
||||||
|
sensitive to be in a public repo, I have a folder of dotfiles and
|
||||||
|
things that I sync between my machines using [[https://www.getsync.com/][Bittorrent Sync]]. The
|
||||||
|
dotfiles are arranged into directories by their purpose:
|
||||||
|
|
||||||
|
#+BEGIN_EXAMPLE
|
||||||
|
[correlr@reason:~/dotenv]
|
||||||
|
% tree -a -L 2
|
||||||
|
.
|
||||||
|
├── authinfo
|
||||||
|
│ └── .authinfo.gpg
|
||||||
|
├── bin
|
||||||
|
│ └── .bin
|
||||||
|
├── emacs
|
||||||
|
│ ├── .bbdb
|
||||||
|
│ └── .emacs.local.d
|
||||||
|
├── mail
|
||||||
|
│ ├── .gnus.el
|
||||||
|
│ ├── .signature
|
||||||
|
├── README.org
|
||||||
|
├── .sync
|
||||||
|
│ ├── Archive
|
||||||
|
│ ├── ID
|
||||||
|
│ ├── IgnoreList
|
||||||
|
│ └── StreamsList
|
||||||
|
├── tex
|
||||||
|
│ └── texmf
|
||||||
|
├── xmonad
|
||||||
|
│ └── .xmonad
|
||||||
|
└── zsh
|
||||||
|
└── .zshenv
|
||||||
|
#+END_EXAMPLE
|
||||||
|
|
||||||
|
This folder structure allows my configs to be easily installed using
|
||||||
|
[[https://www.gnu.org/software/stow/][GNU Stow]] from my =dotenv= folder:
|
||||||
|
|
||||||
|
: stow -vvS *
|
||||||
|
|
||||||
|
Running that command will, for each file in each of the directories,
|
||||||
|
create a symlink to it in my home folder if there isn't a file or
|
||||||
|
directory with that name there already.
|
||||||
|
|
||||||
|
Bittorrent sync also comes in handy for syncing my growing [[http://calibre-ebook.com/][Calibre]] ebook
|
||||||
|
collection, which outgrew my [[https://www.dropbox.com/][Dropbox]] account a while back.
|
Loading…
Reference in a new issue