From 5188719b378b1a79ad69b14f5f1affc96a223903 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:55:20 -0600 Subject: [PATCH 1/7] Omnibus update for nix setup and emacs. Mostly bugfixes --- emacs.org | 6 ++++-- git.org | 2 +- nix.org | 9 +++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/emacs.org b/emacs.org index 0f5716c..1c4faf5 100644 --- a/emacs.org +++ b/emacs.org @@ -659,6 +659,7 @@ Org-mode keybindings and settings, pretty sparse really. :config (progn (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) + (when window-system (let* ((variable-tuple (cond ((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro")) ((x-list-fonts "Lucida Grande") '(:font "Lucida Grande")) ((x-list-fonts "Verdana") '(:font "Verdana")) @@ -676,6 +677,7 @@ Org-mode keybindings and settings, pretty sparse really. `(org-level-2 ((t (,@headline ,@variable-tuple :height 1.5)))) `(org-level-1 ((t (,@headline ,@variable-tuple :height 1.75)))) `(org-document-title ((t (,@headline ,@variable-tuple :height 1.5 :underline nil)))))) + ) (font-lock-add-keywords 'org-mode '(("^ +\\([-*]\\) " (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) @@ -914,7 +916,7 @@ So I write gooder. Me fail English? Thats unpossible. Compress down python configuration a bit. -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (use-package python :commands python-mode :mode ("\\.py\\'" . python-mode) @@ -1304,6 +1306,6 @@ Load this up last to allow for local customization if needed and to keep from cu #+END_SRC * Load any local definitions -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (load-file "~/.emacs.d/local.el") #+END_SRC diff --git a/git.org b/git.org index 65106ee..7553f36 100644 --- a/git.org +++ b/git.org @@ -117,7 +117,7 @@ General git configuration split out into sections mostly. [http] postBuffer = 209715200 #+END_SRC -** push +q** push #+BEGIN_SRC conf :tangle (when (eq git-p t) "tmp/.gitconfig") [push] default = simple diff --git a/nix.org b/nix.org index 05d0d5c..6bad61f 100644 --- a/nix.org +++ b/nix.org @@ -8,12 +8,8 @@ Nix user config.nix setup. #+BEGIN_SRC conf :tangle (when (eq nix-p t) "tmp/.nixpkgs/config.nix") -let - pkgs = import {}; -in -{ - packageOverrides = pkgs: with pkgs; - let in rec { +{ pkgs }: { + packageOverrides = super: let pkgs = super.pkgs; in with pkgs; rec { custom-pybugz = with python34Packages; buildPythonPackage rec { name = "pybugz-${version}"; version = "0.13"; @@ -79,6 +75,7 @@ in graphviz-nox haskellPackages.ShellCheck haskellPackages.bake + haskellPackages.cabal-install haskellPackages.cabal-dependency-licenses haskellPackages.ghc-core haskellPackages.ghc-mod From 63dd9ad7b48625dd06845eaa4125bb9d250ebb3e Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:56:26 -0600 Subject: [PATCH 2/7] Fix PATH nonsense --- dotprofile.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dotprofile.org b/dotprofile.org index d602c37..cd90f88 100644 --- a/dotprofile.org +++ b/dotprofile.org @@ -37,11 +37,6 @@ _host=${_host:=${_uname_n}} #+BEGIN_SRC sh :tangle (when (eq haskell-p t) "tmp/.profile") PATH="${PATH}:${HOME}/.cabal/bin" #+END_SRC -** General -#+BEGIN_SRC sh :tangle "tmp/.profile" -PATH="${PATH}:${HOME}/bin:${HOME}/.local/bin" -export PATH -#+END_SRC * Functions ** General @@ -381,3 +376,9 @@ alias m=mosh #+BEGIN_SRC sh :tangle (when (eq tmux-p t) "tmp/.profile") alias tl='tmux ls' #+END_SRC + +* Final PATH +#+BEGIN_SRC sh :tangle "tmp/.profile" +PATH="${PATH}:${HOME}/bin:${HOME}/.local/bin" +export PATH +#+END_SRC From bf7187eac4749a273ba449973d77bdd76c0c4ba3 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:56:39 -0600 Subject: [PATCH 3/7] Fix a silly logic error in my dns script First real bug in it for years, its served me well. --- bin.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin.org b/bin.org index 78b3349..3f9da3c 100644 --- a/bin.org +++ b/bin.org @@ -186,9 +186,11 @@ my $lookup = $input; if ( $lookup =~ /\d+[.]\d+[.]\d+[.]\d+/smx ) { $lookup = ( gethostbyaddr inet_aton($lookup), AF_INET )[0]; - die "Error: Unable to reverse lookup ip $input.\n" if ( $lookup eq q{} ); } +die "Error: Unable to reverse lookup ip $input.\n" + if ( !(defined $lookup) or $lookup eq q{} ); + my $ipv4 = gethostbyname $lookup; die "Error: $lookup doesn't have any known ip addresses\n" From 4cd6cd1ad5bf1586ad5b51186b5cb5a67dc11cd7 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:57:19 -0600 Subject: [PATCH 4/7] Add intero for haskell mode --- emacs.org | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/emacs.org b/emacs.org index 1c4faf5..d9d2398 100644 --- a/emacs.org +++ b/emacs.org @@ -984,12 +984,19 @@ Need to make haskell source be all pretty. :ensure t :config (progn + (use-package intero + :ensure t + :config + (progn + (add-hook 'haskell-mode-hook 'intero-mode) + ) + ) (use-package hindent :if (executable-find "hindent") :ensure t :config (progn - (add-hook 'haskell-mode-hook #'hindent-mode) + (add-hook 'haskell-mode-hook 'hindent-mode) ) ) (use-package flycheck-haskell :ensure t) @@ -1006,11 +1013,9 @@ Need to make haskell source be all pretty. :config (progn (autoload 'ghc-init "ghc" nil t) - (autoload 'ghc-debug "ghc" nil t) + (autoload 'ghc-debug "ghc" nil t) (add-hook 'haskell-mode-hook (lambda () - (ghc-init) - ) - ) + (ghc-init))) ) ) (add-hook 'haskell-mode-hook 'interactive-haskell-mode) From 7e440135dae970fc1877dfd6e7092560f60ee3c6 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:57:31 -0600 Subject: [PATCH 5/7] Add Idris mode --- emacs.org | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/emacs.org b/emacs.org index d9d2398..374691a 100644 --- a/emacs.org +++ b/emacs.org @@ -1054,6 +1054,42 @@ Need to make haskell source be all pretty. ) #+END_SRC +*** idris-mode + +#+BEGIN_SRC emacs-lisp + (use-package idris-mode + :ensure t + :config + (progn + (add-to-list 'completion-ignored-extensions ".ibc") + (add-hook 'idris-mode-hook' + (lambda () + (push '("()" . ?∅) prettify-symbols-alist) + (push '("\\" . ?λ) prettify-symbols-alist) + (push '("pi" . ?π) prettify-symbols-alist) + (push '("=>" . ?⇒) prettify-symbols-alist) + (push '("->" . ?→) prettify-symbols-alist) + (push '("<-" . ?←) prettify-symbols-alist) + (push '("<=" . ?≤) prettify-symbols-alist) + (push '(">=" . ?≥) prettify-symbols-alist) + (push '("==" . ?≡) prettify-symbols-alist) + (push '("/=" . ?≢) prettify-symbols-alist) + (push '("!!" . "‼") prettify-symbols-alist) + (push '("&&" . ?∧) prettify-symbols-alist) + (push '("||" . ?∨) prettify-symbols-alist) + (push '("~>" . ?⇝) prettify-symbols-alist) + (push '("-<" . ?↢) prettify-symbols-alist) + (push '("not" . ?¬) prettify-symbols-alist) + (push '("forall" . ?∀) prettify-symbols-alist) + (push '("sqrt" . ?√) prettify-symbols-alist) + (push '("undefined" . ?⊥) prettify-symbols-alist) + (prettify-symbols-mode) + ) + ) + ) + ) +#+END_SRC + *** undo-tree Make undo more useful, and treelike. From 9aa0aa286f516d1bb7172a62cb7b385052432146 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Wed, 8 Feb 2017 21:57:58 -0600 Subject: [PATCH 6/7] Add docker mode and cscope/xcscope --- emacs.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/emacs.org b/emacs.org index 374691a..b34c349 100644 --- a/emacs.org +++ b/emacs.org @@ -1134,6 +1134,21 @@ Instead of text might as well get a decent mode hook going here. (use-package nix-mode :ensure t) #+END_SRC +*** docker-mode + +#+BEGIN_SRC emacs-lisp + (use-package dockerfile-mode :defer t) +#+END_SRC + +*** cscope + +#+BEGIN_SRC emacs-lisp + (use-package xcscope + :defer t + :init (progn (cscope-setup)) + ) +#+END_SRC + * mode related *** common defaults From e24884f9292ababdf451f119c69f7bd037975699 Mon Sep 17 00:00:00 2001 From: Mitch Tishmack Date: Sun, 19 Mar 2017 10:02:17 -0500 Subject: [PATCH 7/7] nix.org: remove some unneeded packages. --- nix.org | 138 -------------------------------------------------------- 1 file changed, 138 deletions(-) diff --git a/nix.org b/nix.org index f0354fc..cf4e0ad 100644 --- a/nix.org +++ b/nix.org @@ -18,23 +18,8 @@ Nix user config.nix setup. { packageOverrides = pkgs: with pkgs; let in rec { - custom-pybugz = with python34Packages; buildPythonPackage rec { - name = "pybugz-${version}"; - version = "0.13"; - src = pkgs.fetchgit { - url = https://github.com/williamh/pybugz.git; - rev = "4dec396d43061c1def9aa19601c89c8aa00742b3"; - sha256 = "1s21jma83cyynmv3696hbrgy0d3sq4j027iplhnw22q2237bk1xd"; - }; - # TODO: Fix this, something to do with how its using unittest - doCheck = false; - buildInputs = [ pkgs.glibcLocales ]; - propagatedBuildInputs = [ six ]; - }; custom-pinentry = pinentry.override { gtk2 = null; qt4 = null; ncurses = null; }; custom-youtube-dl = python27Packages.youtube-dl.override { pandoc = null; }; - # 3 unit tests fail on both 27 pylint and 35 pylint, so ignore it -# custom-pylint = python35Packages.pylint.override { doCheck = false; }; custom-git = git.override { pythonSupport = false; @@ -43,125 +28,11 @@ Nix user config.nix setup. sendEmailSupport = true; }; -<<<<<<< variant A - default = buildEnv { - name = "default"; - ignoreCollisions = true; - paths = [ - ack - ansible - aria - aspell - aspellDicts.en - bazaarTools - cacert - clang - clang-analyzer - cloc - cscope - ctags - curl - custom-git - custom-pinentry - custom-pybugz - custom-pylint - custom-youtube-dl - diffutils - docbook5 - duply - emacs - entr - gcc - gdbm - ghostscript - gist - gitAndTools.git-extras - gitAndTools.gitFull - gnumake - gnupg - gnupg1compat - gnutar - graphviz-nox - haskellPackages.ShellCheck - haskellPackages.bake - haskellPackages.cabal-install - haskellPackages.cabal-dependency-licenses - haskellPackages.ghc-core - haskellPackages.ghc-mod - haskellPackages.hasktags - haskellPackages.hindent - haskellPackages.hoogle - haskellPackages.hspec - haskellPackages.idris - haskellPackages.intero - haskellPackages.network - haskellPackages.pandoc - haskellPackages.shake - haskellPackages.stack - htop - imagemagick - iperf - jq - keychain - lastpass-cli - less - llvm - mercurial - moreutils - mosh - multimarkdown - multitail - mutt - mr - nox - openssl - p7zip - patchutils - pbzip2 - pigz - pixz - pkgconfig - poppler_utils - postgresql - pv - python27Packages.bugzilla - python27Packages.flake8 - python27Packages.howdoi - python27Packages.pip - python27Packages.pyflakes - python27Packages.virtualenv - readline - rlwrap - rsync - rtags - gmp - silver-searcher - sloccount - sqlite - sshpass - subversionClient - texlive.combined.scheme-full - tmux - tree - unrar - unzip - upx - wakelan - watch - wget - xz -# If I ever come up with some linux only stuff or figure out xhyve -# ] ++ stdenv.lib.optionals stdenv.isLinux [ -# ] ++ stdenv.lib.optionals stdenv.isDarwin [ -# xhyve - ]; ->>>>>>> variant B default = buildEnv { name = "default"; ignoreCollisions = true; paths = [ ack - ansible aria aspell aspellDicts.en @@ -175,8 +46,6 @@ Nix user config.nix setup. curl custom-git custom-pinentry - custom-pybugz -# custom-pylint custom-youtube-dl diffutils docbook5 @@ -205,7 +74,6 @@ Nix user config.nix setup. haskellPackages.hspec haskellPackages.idris haskellPackages.intero - haskellPackages.network haskellPackages.pandoc haskellPackages.shake haskellPackages.stack @@ -233,16 +101,12 @@ Nix user config.nix setup. pigz pixz pkgconfig - poppler_utils - postgresql pv - python27Packages.bugzilla python27Packages.flake8 python27Packages.howdoi python27Packages.pip python27Packages.pyflakes python27Packages.virtualenv - readline rlwrap rsync rtags @@ -251,7 +115,6 @@ Nix user config.nix setup. sloccount sqlite sshpass - subversionClient texlive.combined.scheme-full tmux tree @@ -269,7 +132,6 @@ Nix user config.nix setup. # xhyve ]; }; -======= end }; allowUnfree = true; }