Skip to content

Commit

Permalink
Update dotfiles for use with NixOS
Browse files Browse the repository at this point in the history
* Added dotfiles-update script which will successfully download the
dotfiles repo and set up symlinks when run from an arbitrary
directory.

* Removed vim configuration files and vundle plugin module as vim
configuration and plugins will now be handled via nix configuration
  • Loading branch information
lihop committed Jul 3, 2015
1 parent c23841c commit b71354d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 100 deletions.
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

36 changes: 10 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
Requirements
------------
The directory structure of these dotfiles is designed to be used with [GNU Stow](http://www.gnu.org/software/stow/). This repo also includes the vim plugin manager [Vundle](https://github.com/gmarik/Vundle.vim) as a submodule.

Quick Installation
------------------
```
git clone https://github.com/lihop/.dotfiles.git
.dotfiles/install.sh
```
Installation
------------
1. Install the dotfiles package using [this](https://github.com/lihop/nixos/blob/master/pkgs/dotfiles.nix) nix expression.
2. Run the command `dotfiles-update`.

Usage
-----
```
git clone --recursive https://github.com/lihop/.dotfiles.git
```
```
cd ~/.dotfiles
```
To symlink all the dotfiles:
```
cd ~/.dotfiles
for dir in */; do stow $dir; done
```
To symlink the dotfiles of an individual application (e.g. vim) use the following from within the `.dotfiles` directory:
To symlink the dotfiles of an individual application (e.g. xmonad):
```
stow vim
stow xmonad
```
To remove the symlink:
```
stow -D vim
stow -D xmonad
```


By default, the Vundle submodule is not on a branch. This means that Vundle will not be able to update itself using `git pull`. To check out the master branch, run the following command from within the `.dotfiles` directory:
```
git submodule foreach --recursive git checkout master
```
To update/install Vundle/Plugins (assuming you have the `vim` directory stowed):
```
vim -c VundleUpdate -c quitall
```
23 changes: 23 additions & 0 deletions dotfiles-update
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

[email protected]:lihop/dotfiles.git
DOTFILES_DIR=$HOME/.dotfiles

download() {
git clone $DOTFILES_SRC $DOTFILES_DIR
}

update() {
if [ ! -d $DOTFILES_DIR ]; then
download
cd $DOTFILES_DIR
else
cd $DOTFILES_DIR
git pull
fi
for dir in */; do
stow $dir
done
}

update
6 changes: 0 additions & 6 deletions install.sh

This file was deleted.

4 changes: 0 additions & 4 deletions vim/.vim/bundle/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion vim/.vim/bundle/Vundle.vim
Submodule Vundle.vim deleted from 0b28e3
4 changes: 0 additions & 4 deletions vim/.vim/plugin/strip-trailing-whitespace.vim

This file was deleted.

55 changes: 0 additions & 55 deletions vim/.vimrc

This file was deleted.

0 comments on commit b71354d

Please sign in to comment.