summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.envrc59
-rw-r--r--Biz/Bild.nix1
-rw-r--r--Biz/Bild/ShellHook.sh32
-rwxr-xr-xBiz/Ide/deps4
-rwxr-xr-xBiz/Ide/tips12
5 files changed, 50 insertions, 58 deletions
diff --git a/.envrc b/.envrc
index 011073f..99e3c24 100644
--- a/.envrc
+++ b/.envrc
@@ -1,25 +1,34 @@
-if ! has nix_direnv_version || ! nix_direnv_version 1.5.1; then
- source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.5.1/direnvrc" "sha256-p4CDMJjuBmEh9pkn2aoJrZqr0DlPZHPU7eXOSDzzcuo="
-fi
-
-use nix
-
-export BIZ_ROOT=$PWD
-
-PATH_add $BIZ_ROOT/Biz/Ide
-
-# for some reason I need this to get ':e' in ghci to load my vimrc
-export EDITOR=vim
-export GUILE_LOAD_PATH=$BIZ_ROOT
-
-# Biz/Devalloc.hs:
-export GITHUB_CLIENT_ID=aa575dc96263bc99556d
-export GITHUB_CLIENT_STATE=$(cat /proc/sys/kernel/random/uuid)
-export STRIPE_PUBKEY=pk_test_51I3jv1IC3f10BNLClrBmNr485mWSzQkITvjO0MmSeFn4chFqmODJaHcI7IiN1sqSJYusmRhuPzeGTbCrl8dMsSQP00JXUmlVFC
-
-if type lorri &>/dev/null
-then
- eval "$(lorri direnv)"
-fi
-
-. ./.envrc.local
+# setup dev environment using direnv
+#
+ if ! has nix_direnv_version || ! nix_direnv_version 1.5.1; then
+ source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/1.5.1/direnvrc" "sha256-p4CDMJjuBmEh9pkn2aoJrZqr0DlPZHPU7eXOSDzzcuo="
+ fi
+#
+ use nix
+#
+ export BIZ_ROOT=$PWD
+#
+# tools for editing go here
+ PATH_add $BIZ_ROOT/Biz/Ide
+#
+# until 'repl' supports guile, this is needed
+ export GUILE_LOAD_PATH=$BIZ_ROOT
+#
+# Biz/Dragons.hs:
+ export GITHUB_CLIENT_ID=aa575dc96263bc99556d
+ export GITHUB_CLIENT_STATE=$(cat /proc/sys/kernel/random/uuid)
+ export STRIPE_PUBKEY=pk_test_51I3jv1IC3f10BNLClrBmNr485mWSzQkITvjO0MmSeFn4chFqmODJaHcI7IiN1sqSJYusmRhuPzeGTbCrl8dMsSQP00JXUmlVFC
+#
+# run lorri if its available
+ if type lorri &>/dev/null
+ then
+ eval "$(lorri direnv)"
+ fi
+#
+# configure git hooks
+ git config --local core.hooksPath "$BIZ_ROOT/Biz/Ide/hooks"
+#
+# load local settings
+ . ./.envrc.local
+##
+ tips
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index cfdd5b8..a56ba4d 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -164,7 +164,6 @@ in rec {
#inspekt3d
#libfive
];
- shellHook = ". ${./Bild/ShellHook.sh}";
};
os = cfg: (nixpkgs.nixos (args: cfg)).toplevel;
diff --git a/Biz/Bild/ShellHook.sh b/Biz/Bild/ShellHook.sh
deleted file mode 100644
index c2e191a..0000000
--- a/Biz/Bild/ShellHook.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env bash
-##
- function tips() {
- echo ""
- echo "bizdev" | figlet | lolcat
- echo ""
- echo " bild compile code"
- echo " repl start a repl"
- echo " ci run all builds and tests"
- echo " deps manage dependencies with niv"
- echo " tips show this message"
- echo " lint auto-lint all changed files"
- echo " push send a namespace to the cloud"
- echo " ship lint, bild, and push one (or all) namespace(s)"
- }
-#
- alias runghc="runghc --ghc-arg=-i\$BIZ_ROOT"
- alias guile="guile -L \$BIZ_ROOT"
- alias tree="tree -I _ -F"
-# configure git hooks
- git config --local core.hooksPath "$BIZ_ROOT/Biz/Ide/hooks"
-#
- function deps() {
- niv --sources-file "$BIZ_ROOT/Biz/Bild/Sources.json" "$@"
- }
-#
-# Poor man's ci
- alias ci="$BIZ_ROOT/Biz/Ide/hooks/pre-push"
-#
-#
- tips
-##
diff --git a/Biz/Ide/deps b/Biz/Ide/deps
new file mode 100755
index 0000000..1dc7ff3
--- /dev/null
+++ b/Biz/Ide/deps
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+#
+# this really needs to be its own Biz/Bild/Deps.hs thing
+niv --sources-file "$BIZ_ROOT/Biz/Bild/Sources.json" "$@"
diff --git a/Biz/Ide/tips b/Biz/Ide/tips
new file mode 100755
index 0000000..1b998e6
--- /dev/null
+++ b/Biz/Ide/tips
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+echo ""
+echo "bizdev" | figlet | lolcat
+echo ""
+echo " bild compile code"
+echo " repl start a repl"
+echo " deps manage dependencies with niv"
+echo " tips show this message"
+echo " lint auto-lint all changed files"
+echo " push send a namespace to the cloud"
+echo " ship lint, bild, and push one (or all) namespace(s)"
+echo ""