Skip to content

Instantly share code, notes, and snippets.

@gilligan
Created November 11, 2018 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilligan/c7f5aaddf8363ddade21c645b177096f to your computer and use it in GitHub Desktop.
Save gilligan/c7f5aaddf8363ddade21c645b177096f to your computer and use it in GitHub Desktop.
# Path to your oh-my-zsh installation.
ZSH=$(nix-env -q --out-path oh-my-zsh | cut -f 3 -d' ')/share/oh-my-zsh
ZSH_THEME="obraun"
DISABLE_AUTO_UPDATE="true"
plugins=(git)
# User configuration
export FZF_DEFAULT_COMMAND='ag -g ""'
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH=$PATH:./node_modules/.bin
export PATH=$PATH:~/.node/node_modules/.bin:$PATH
source $ZSH/oh-my-zsh.sh
alias ramda="replem ramda:R"
alias e="exa --long --git"
alias vim="nvim"
NIXPKGS_UNSTABLE='import (fetchTarball https://nixos.org/channels/nixpkgs-unstable/nixexprs.tar.xz) {}'
nix-search(){ nix-env -qa \* -P | grep -i "$1"; }
nix-search-channel() { nix-env -f http://nixos.org/channels/$1/nixexprs.tar.xz -qa \* -P | grep -i "$2"; }
nix-install-from() { nix-env -f http://nixos.org/channels/$1/nixexprs.tar.xz -i $2; }
nix-deps() { nix-store --query --references $(nix-instantiate '<nixpkgs>' -A $1) }
nix-get-sources() { nix-build '<nixpkgs>' -A "$1".src }
nix-get-version() { nix-instantiate --eval -E '(import <nixpkgs> {}).lib.nixpkgsVersion' }
nix-hs-shell() { nix-shell -p -v "haskellPackages.ghcWithHoogle(pkgs: with pkgs; [$1])" }
nixos-build-tree() { nix-store -q --tree $(nix-instantiate '<nixos/nixos>' -A system) }
docker-rm-containers() { docker rm $(docker ps -a -q) }
docker-rm-images() { docker rmi $(docker images -q) }
pbcopy() { xclip -selection clipboard }
git-config-tpflug() { git config user.email "tobias.pflug@holidaycheck.com" }
git-config-gilligan() { git config user.email "tobias.pflug@gmx.net" }
export BROWSER=chromium
export TERM=xterm-256color
export NIXPKGS_ALLOW_UNFREE=1
# Load fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Load the variables.
if [ -f ~/.zsh_variables ]; then
. ~/.zsh_variables
fi
# Load the functions.
if [ -f ~/.zsh_funcs ]; then
. ~/.zsh_funcs
fi
# Load the aliases.
if [ -f ~/.zsh_aliases ]; then
. ~/.zsh_aliases
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment