From 4c8f5d43f99619e0c6652bebf48fc76309de964f Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Tue, 12 Apr 2016 11:29:08 -0500 Subject: [PATCH 1/6] Remove old emacs custom handling --- Makefile | 7 ------- etangle | 3 --- 2 files changed, 10 deletions(-) diff --git a/Makefile b/Makefile index a7483f7..2476a24 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,6 @@ all: clean tangle-next tmp: install -dm755 $@ - $(MAKE) emacs - -#special target to handle emacs configuration -emacs: - install -dm755 tmp/.emacs.d - install -m400 init.el tmp/emacs.d/init.el - install -m400 emacs.org tmp/emacs.d/emacs.org $(NEXTGEN): install -dm755 $@ diff --git a/etangle b/etangle index dd3fce6..4e61976 100755 --- a/etangle +++ b/etangle @@ -1,9 +1,6 @@ ;;-*-mode: emacs-lisp; coding: utf-8;-*- ;; Copyright: 2016 Mitchell Tishmack ;; Tangle an org mode file with babel using emacs. -(let ((default-directory "~/.emacs.d")) - (normal-top-level-add-subdirs-to-load-path)) - (load-file (if (getenv "OPTIONS") (concat (concat "./" (getenv "OPTIONS")) ".el") "./options.el")) From 18063e5aa51958c49079bc58a149f084a9b35c27 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 13 Apr 2016 10:52:02 -0500 Subject: [PATCH 2/6] Have use-package report startup info. --- emacs.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs.org b/emacs.org index a88a456..e778501 100644 --- a/emacs.org +++ b/emacs.org @@ -38,6 +38,7 @@ This configuration is using *use-package* extensively. Install it straight away. (package-initialize))) (require 'use-package) + (setq use-package-verbose t) #+END_SRC *** match end of string function From 79b348c0c2db6d4364d3cee462397b5a8dc4de93 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 13 Apr 2016 10:52:15 -0500 Subject: [PATCH 3/6] Git clone --recursive in the git clone wrapper --- readme.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.org b/readme.org index 2b952f5..d705453 100644 --- a/readme.org +++ b/readme.org @@ -347,7 +347,7 @@ maybe_git_repo() if [ $? = 0 ]; then mkdir -p "${repo}" echo "git clone ${rrepo} ${repo}" - git clone "${rrepo}" "${repo}" + git clone --recursive "${rrepo}" "${repo}" else echo "${rrepo} doesn't look to be a git repository" fi From 65e3dc490182b94e2fb196c6fc3311775a1d3ca0 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 13 Apr 2016 10:53:23 -0500 Subject: [PATCH 4/6] Split .gitconfig out to separate out nix setup --- readme.org | 99 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 27 deletions(-) diff --git a/readme.org b/readme.org index d705453..d8d0112 100644 --- a/readme.org +++ b/readme.org @@ -1522,12 +1522,19 @@ end * git ** ~/.gitconfig +:PROPERTIES: +:header-args: :tangle tmp/.gitconfig :comments no :padline no :cache yes :mkdirp yes +:END: General git configuration. -#+BEGIN_SRC conf :tangle tmp/.gitconfig :results replace +*** pager +#+BEGIN_SRC conf [pager] color = true +#+END_SRC +*** color +#+BEGIN_SRC conf [color] status = auto diff = auto @@ -1545,48 +1552,86 @@ General git configuration. frag = black reverse old = red reverse new = green reverse -[alias] - begin = !sh -c 'git init && git commit --allow-empty -m "Initial commit"' - up = !sh -c 'git pull --rebase && git push' - wsdiff = diff --color-words --ignore-space-at-eol --ignore-space-change --ignore-all-space --ignore-all-space - wdiff = diff --color-words - ci = commit - ciu = commit --all - co = checkout - ds = diff --stat - ba = branch --all - st = status --short --branch - s = status --short --branch --untracked-files=no - unstage = reset HEAD - tlog = log --graph --color=always --abbrev-commit --date=relative --pretty=oneline - hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative - slog = log --oneline --decorate - fixup = commit --fixup - squash = commit --squash - ri = rebase --interactive --autosquash - ra = rebase --abort - effit = reset --hard - # What commits differ between branches, note, equivalent commits are omitted. - # Use this with three dot operator aka master...origin/master - cdiff = log --left-right --graph --cherry-pick --oneline - # Same as ^ only equivalent commits are listed with a = sign. - cmdiff = log --left-right --graph --cherry-mark --oneline +#+END_SRC +*** alias +#+BEGIN_SRC conf + [alias] + begin = !git init && git commit --allow-empty -m 'Initial empty commit' + up = !git pull --rebase && git push + wsdiff = diff --color-words --ignore-space-at-eol --ignore-space-change --ignore-all-space --ignore-all-space + wdiff = diff --color-words + ci = commit + ciu = commit --all + co = checkout + ds = diff --stat + ba = branch --all + st = status --short --branch + s = status --short --branch --untracked-files=no + unstage = reset HEAD + tlog = log --graph --color=always --abbrev-commit --date=relative --pretty=oneline + hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative + slog = log --oneline --decorate + fixup = commit --fixup + squash = commit --squash + ri = rebase --interactive --autosquash + ra = rebase --abort + effit = reset --hard + # What commits differ between branches, note, equivalent commits are omitted. + # Use this with three dot operator aka master...origin/master + cpdiff = log --no-merges --left-right --graph --cherry-pick --oneline + # Same as ^ only equivalent commits are listed with a = sign. + cmdiff = log --no-merges --left-right --graph --cherry-mark --oneline + # git update with submodule update + sup = !git checkout master && git pull && git submodule update --init --recursive + # git clone with submodules + sc = !git clone --recursive $1 + # what files are getting updated a lot + churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}' + # help the gc a bit and get a bit more space back for a local clone + trim = !git reflog expire --expire=now --all && git gc --prune=now +#+END_SRC +*** github +#+BEGIN_SRC conf [github] user = mitchty +#+END_SRC +*** credential +#+BEGIN_SRC conf [credential] helper = netrc -v -f ~/.netrc.gpg -f ~/.netrc +#+END_SRC +*** advice +#+BEGIN_SRC conf [advice] statushints = false +#+END_SRC +*** gui +#+BEGIN_SRC [gui] fontui = -family Monaco -size 8 -weight normal -slant roman -underline 0 -overstrike 0 fontdiff = -family Monaco -size 8 -weight normal -slant roman -underline 0 -overstrike 0 +#+END_SRC +*** http +#+BEGIN_SRC [http] postBuffer = 209715200 +#+END_SRC +*** nix +#+BEGIN_SRC conf :tangle (when (eq nix-p t) "tmp/.gitconfig") sslcainfo = ~/.nix-profile/etc/ca-bundle.crt +#+END_SRC +*** push +#+BEGIN_SRC conf [push] default = simple +#+END_SRC +*** url rewrites +#+BEGIN_SRC conf [url "https://github.com/"] insteadOf = git://github.com/ +#+END_SRC +*** username/email +#+BEGIN_SRC conf [user] name = Mitch Tishmack email = mitch.tishmack@gmail.com From 4c8b308228c2cb9021b1036c14022abe9b4888b8 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 13 Apr 2016 10:53:48 -0500 Subject: [PATCH 5/6] Update nix haskell config rtags is not working on osx, and idris is failing to compile. Ain't got time to fix/debug right now. Later. --- readme.org | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/readme.org b/readme.org index d8d0112..c68b19f 100644 --- a/readme.org +++ b/readme.org @@ -2208,6 +2208,9 @@ endif " has("autocmd") unzip upx xz + multimarkdown + jq +# rtags broken again on osx, fix it p7zip unrar watch @@ -2227,7 +2230,7 @@ endif " has("autocmd") ]; }; env_hs = - pkgs.haskell.packages.ghc7102.ghcWithPackages + pkgs.haskell.packages.ghc7103.ghcWithPackages (haskellPackages: with haskellPackages; [ alex happy @@ -2241,7 +2244,7 @@ endif " has("autocmd") hindent hoogle hspec - idris +# idris # zlib is complaining for some reason, hmmm pandoc shake ShellCheck From 9d34e7d69034c19be0a1e806d822fd92a44651fe Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 13 Apr 2016 13:54:57 -0500 Subject: [PATCH 6/6] Fix recent nix git ssl cert nonsense on osx. --- readme.org | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/readme.org b/readme.org index c68b19f..252bcf1 100644 --- a/readme.org +++ b/readme.org @@ -416,6 +416,22 @@ nix_env_setup() nix_env_setup #+END_SRC + +Workaround stupid ssl crap with recent nix. + +#+BEGIN_SRC sh :tangle (when (and (eq nix-p t) (eq osx-p t)) "tmp/.profile") +SSL_CERT_FILE="${HOME}/.nix-profile/etc/ssl/certs/ca-bundle.crt" +GIT_SSL_CAINFO=$SSL_CERT_FILE +export SSL_CERT_FILE +export GIT_SSL_CAINFO +#+END_SRC + +TODO Add linux ca-bundle detection + if test -e /etc/ssl/certs/ca-bundle.crt ; # Fedora, NixOS + set -xg SSL_CERT_FILE /etc/ssl/certs/ca-bundle.crt ; + else if test -e /etc/ssl/certs/ca-certificates.crt ; # Ubuntu, Debian + set -xg SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt + *** tmux #+BEGIN_SRC sh :tangle (when (eq tmux-p t) "tmp/.profile") t() @@ -1616,10 +1632,6 @@ General git configuration. [http] postBuffer = 209715200 #+END_SRC -*** nix -#+BEGIN_SRC conf :tangle (when (eq nix-p t) "tmp/.gitconfig") - sslcainfo = ~/.nix-profile/etc/ca-bundle.crt -#+END_SRC *** push #+BEGIN_SRC conf [push]