summaryrefslogtreecommitdiff
path: root/dots
diff options
context:
space:
mode:
Diffstat (limited to 'dots')
-rw-r--r--dots/git/.gitconfig.j22
-rwxr-xr-xdots/gpg/.gnupg/gpg-agent.conf2
-rwxr-xr-xdots/gpg/.gnupg/gpg-agent.conf.j22
-rw-r--r--dots/gpg/.pubkey.j2 (renamed from dots/home/.pubkey.j2)0
-rw-r--r--dots/home/.local/bin/.gitkeep0
-rwxr-xr-xdots/home/scripts/pinentry.sh20
-rwxr-xr-xdots/home/scripts/pinentry.sh.j216
-rw-r--r--dots/zed/.config/zed/keymap.json2
-rw-r--r--dots/zsh/.config/zsh/.zshrc18
-rwxr-xr-xdots/zsh/.config/zsh/linux/init.zsh6
-rwxr-xr-xdots/zsh/.config/zsh/linux/linux.init.zsh1
-rwxr-xr-xdots/zsh/.config/zsh/osx/armin.zsh2
-rwxr-xr-xdots/zsh/.config/zsh/osx/osx.init.zsh (renamed from dots/zsh/.config/zsh/osx/init.zsh)4
-rwxr-xr-xdots/zsh/.config/zsh/osx/work.zsh7
-rwxr-xr-xdots/zsh/.config/zsh/setup/device.zsh10
-rw-r--r--dots/zsh/.config/zsh/setup/env.zsh.j217
-rwxr-xr-xdots/zsh/.config/zsh/setup/gpg.zsh.j27
-rwxr-xr-xdots/zsh/.config/zsh/setup/keybinds.zsh (renamed from dots/zsh/.config/zsh/setup/misc.zsh)0
18 files changed, 58 insertions, 58 deletions
diff --git a/dots/git/.gitconfig.j2 b/dots/git/.gitconfig.j2
index 015ad96..dc8d3e3 100644
--- a/dots/git/.gitconfig.j2
+++ b/dots/git/.gitconfig.j2
@@ -1,7 +1,7 @@
[user]
signingkey = {{ pgp.signing }}
user = {{ user.name }}
- email = {{ user.email }}
+ email = {{ user.work_email if features.work_mode else user.email }}
[commit]
gpgsign = true
[core]
diff --git a/dots/gpg/.gnupg/gpg-agent.conf b/dots/gpg/.gnupg/gpg-agent.conf
deleted file mode 100755
index 3578512..0000000
--- a/dots/gpg/.gnupg/gpg-agent.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-pinentry-program /tmp/pinentry
-enable-ssh-support
diff --git a/dots/gpg/.gnupg/gpg-agent.conf.j2 b/dots/gpg/.gnupg/gpg-agent.conf.j2
new file mode 100755
index 0000000..7f1ed6a
--- /dev/null
+++ b/dots/gpg/.gnupg/gpg-agent.conf.j2
@@ -0,0 +1,2 @@
+pinentry-program {{ user.home }}/scripts/pinentry.sh
+enable-ssh-support
diff --git a/dots/home/.pubkey.j2 b/dots/gpg/.pubkey.j2
index e4e3602..e4e3602 100644
--- a/dots/home/.pubkey.j2
+++ b/dots/gpg/.pubkey.j2
diff --git a/dots/home/.local/bin/.gitkeep b/dots/home/.local/bin/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dots/home/.local/bin/.gitkeep
diff --git a/dots/home/scripts/pinentry.sh b/dots/home/scripts/pinentry.sh
deleted file mode 100755
index f02ee6f..0000000
--- a/dots/home/scripts/pinentry.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-
-source log.sh "pinentry.sh"
-
-#-- <gpg> --
-bin="${HOMEBREW_PREFIX:-"/usr"}/bin"
-case "$PINENTRY_USER_DATA" in
- *USE_TTY*) pe=$bin/pinentry-tty ;;
- *USE_CURSES*) pe=$bin/pinentry-curses ;;
- *USE_QT*) pe=$bin/pinentry-qt ;;
- *USE_MAC*) pe=$bin/pinentry-mac ;;
- *USE_GTK2*) pe=$bin/pinentry-gtk-2 ;;
- *USE_GNOME3*) pe=$bin/pinentry-gnome3 ;;
- *USE_X11*) pe=$bin/pinentry-x11 ;;
-esac
-
-log DEBUG "$pe"
-
-exec $pe "$@"
-#-- </gpg> --
diff --git a/dots/home/scripts/pinentry.sh.j2 b/dots/home/scripts/pinentry.sh.j2
new file mode 100755
index 0000000..98352ac
--- /dev/null
+++ b/dots/home/scripts/pinentry.sh.j2
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+#-- <gpg> --
+bin="${HOMEBREW_PREFIX:-"/usr"}/bin"
+case "$PINENTRY_USER_DATA" in
+ *USE_TTY*) pinentry=$bin/pinentry-tty ;;
+ *USE_CURSES*) pinentry=$bin/pinentry-curses ;;
+ *USE_QT*) pinentry=$bin/pinentry-qt ;;
+ *USE_MAC*) pinentry=$bin/pinentry-mac ;;
+ *USE_GTK2*) pinentry=$bin/pinentry-gtk-2 ;;
+ *USE_GNOME3*) pinentry=$bin/pinentry-gnome3 ;;
+ *USE_X11*) pinentry=$bin/pinentry-x11 ;;
+esac
+
+exec $pinentry "$@"
+#-- </gpg> --
diff --git a/dots/zed/.config/zed/keymap.json b/dots/zed/.config/zed/keymap.json
index 816b7c6..674412b 100644
--- a/dots/zed/.config/zed/keymap.json
+++ b/dots/zed/.config/zed/keymap.json
@@ -8,7 +8,7 @@
{
"context": "Editor",
"bindings": {
- // "j k": ["workspace::SendKeystrokes", "escape"]
+ "ctrl-enter": "editor::AcceptEditPrediction"
}
}
]
diff --git a/dots/zsh/.config/zsh/.zshrc b/dots/zsh/.config/zsh/.zshrc
index bc445ae..e05eddf 100644
--- a/dots/zsh/.config/zsh/.zshrc
+++ b/dots/zsh/.config/zsh/.zshrc
@@ -3,15 +3,23 @@
#-- <startup> --
export XDG_CONFIG_HOME="$HOME/.config"
export ZDOTDIR=${XDG_CONFIG_HOME:-$HOME/.config}/zsh
-export PATH=$PATH:$HOME/scripts:$HOME/.local/bin
+#-- </startup> --
+
+#-- <env> --
+. "$ZDOTDIR/setup/env.zsh"
+#-- </env> --
+#-- <log> --
source log.sh ".zshrc"
+#-- </log> --
+
+#-- <greet> --
greet.sh
-#-- </startup> --
+#-- </greet> --
-#-- <misc> --
-. "$ZDOTDIR/setup/misc.zsh"
-#-- </misc> --
+#-- <keybinds> --
+. "$ZDOTDIR/setup/keybinds.zsh"
+#-- </keybinds> --
#-- <common_aliases> --
. "$ZDOTDIR/setup/aliases.zsh"
diff --git a/dots/zsh/.config/zsh/linux/init.zsh b/dots/zsh/.config/zsh/linux/init.zsh
deleted file mode 100755
index 49db77e..0000000
--- a/dots/zsh/.config/zsh/linux/init.zsh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/zsh
-
-#-- <gpg> --
-export PINENTRY_USER_DATA="PINENTRY_USE_QT"
-#-- </gpg> --
-
diff --git a/dots/zsh/.config/zsh/linux/linux.init.zsh b/dots/zsh/.config/zsh/linux/linux.init.zsh
new file mode 100755
index 0000000..f7df9c2
--- /dev/null
+++ b/dots/zsh/.config/zsh/linux/linux.init.zsh
@@ -0,0 +1 @@
+#!/bin/zsh
diff --git a/dots/zsh/.config/zsh/osx/armin.zsh b/dots/zsh/.config/zsh/osx/armin.zsh
index cc54a2e..f7df9c2 100755
--- a/dots/zsh/.config/zsh/osx/armin.zsh
+++ b/dots/zsh/.config/zsh/osx/armin.zsh
@@ -1,3 +1 @@
#!/bin/zsh
-
-
diff --git a/dots/zsh/.config/zsh/osx/init.zsh b/dots/zsh/.config/zsh/osx/osx.init.zsh
index 0cb288d..f60c2bc 100755
--- a/dots/zsh/.config/zsh/osx/init.zsh
+++ b/dots/zsh/.config/zsh/osx/osx.init.zsh
@@ -7,7 +7,3 @@ eval "$(/opt/homebrew/bin/brew shellenv)"
# use gnu coreutils
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
#-- </brew> --
-
-#-- <gpg> --
-export PINENTRY_USER_DATA="PINENTRY_USE_MAC"
-#-- </gpg> --
diff --git a/dots/zsh/.config/zsh/osx/work.zsh b/dots/zsh/.config/zsh/osx/work.zsh
index 6fff676..19b9bcd 100755
--- a/dots/zsh/.config/zsh/osx/work.zsh
+++ b/dots/zsh/.config/zsh/osx/work.zsh
@@ -1,13 +1,7 @@
#!/bin/zsh
#-- <amzn> --
-export AWS_REGION=us-west-2
-
-# finch
-export DOCKER_HOST=unix:///Applications/Finch/lima/data/finch/sock/finch.sock
-
# bb ...
-export PATH="$PATH:$HOME/.toolbox/bin"
alias bb='brazil-build'
alias bba='brazil-build apollo-pkg'
alias bre='brazil-runtime-exec'
@@ -26,4 +20,3 @@ alias brazil-recursive-cmd='brazil-recursive-cmd-parallel'
# run java repl with class path of package! :D
alias jshell='jshell --class-path "`brazil-path build.classpath`:`brazil-path run.classpath`"'
#-- </amzn> --
-
diff --git a/dots/zsh/.config/zsh/setup/device.zsh b/dots/zsh/.config/zsh/setup/device.zsh
index d3f8c4b..cd7965e 100755
--- a/dots/zsh/.config/zsh/setup/device.zsh
+++ b/dots/zsh/.config/zsh/setup/device.zsh
@@ -5,23 +5,23 @@ source log.sh "setup/device.zsh"
#-- <os_init> --
platform="$(platform.sh)"
platform_setup="$ZDOTDIR/$platform"
-init_platform="$platform_setup/init.zsh"
+init_platform="$platform_setup/$platform.init.zsh"
if [ ! -d "$platform_setup" ]; then
log ERROR "misconfigured platform $platform: $platform_setup is not a directory"
exit 1
fi
-if [ -e "$init_platform" ]; then
+if [ -e "$init_platform" ]; then
log DEBUG "executing $init_platform"
. "$init_platform"
-else
+else
log DEBUG "no platform-specific init for $platform at $init_platform"
fi
#-- </os_init> --
#-- <machine_init> --
machine="$(system_name.sh)"
-machine_init="$platform_setup/$machine.zsh"
-if [ -e "$machine_init" ]; then
+machine_init="$platform_setup/$machine.zsh"
+if [ -e "$machine_init" ]; then
log DEBUG "executing $platform.$machine $machine_init"
. "$machine_init"
else
diff --git a/dots/zsh/.config/zsh/setup/env.zsh.j2 b/dots/zsh/.config/zsh/setup/env.zsh.j2
new file mode 100644
index 0000000..194e20e
--- /dev/null
+++ b/dots/zsh/.config/zsh/setup/env.zsh.j2
@@ -0,0 +1,17 @@
+#!/bin/zsh
+
+#-- <context.env> --
+{% for key,val in env.items() %}
+export {{ key }}={{ val }}
+{% endfor %}
+#-- </context.env> --
+
+#-- <context.paths.prefix> --
+# {{ paths.prefix.keys() | join(", ") }}
+export PATH="{{ paths.prefix.values() | join(":") }}:$PATH"
+#-- </context.paths.prefix> --
+
+#-- <context.paths.suffix> --
+# {{ paths.suffix.keys() | join(", ") }}
+export PATH="$PATH:{{ paths.suffix.values() | join(":") }}"
+#-- </context.paths.suffix> --
diff --git a/dots/zsh/.config/zsh/setup/gpg.zsh.j2 b/dots/zsh/.config/zsh/setup/gpg.zsh.j2
index 4ffb38f..ea5a418 100755
--- a/dots/zsh/.config/zsh/setup/gpg.zsh.j2
+++ b/dots/zsh/.config/zsh/setup/gpg.zsh.j2
@@ -1,20 +1,17 @@
#!/bin/zsh
-
# -- <gpg> --
KEY_ID="{{ pgp.id }}"
gpg -k "$KEY_ID" >/dev/null 2>&1 || gpg --import "$HOME/.pubkey"
-cp $HOME/scripts/pinentry.sh /tmp/pinentry
-
-
export PINENTRY_USER_DATA="${PINENTRY_USER_DATA:-PINENTRY_USE_TTY}"
if [ "$SSH_CLIENT" ]; then
export PINENTRY_USER_DATA=PINENTRY_USE_CURSES
exit 0
fi
-# yubikey!
+# yubikey ssh, gpg, and the works!
+# https://github.com/drduh/YubiKey-Guide
unset SSH_AGENT_PID
export GPG_TTY=$(tty)
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
diff --git a/dots/zsh/.config/zsh/setup/misc.zsh b/dots/zsh/.config/zsh/setup/keybinds.zsh
index f301dcc..f301dcc 100755
--- a/dots/zsh/.config/zsh/setup/misc.zsh
+++ b/dots/zsh/.config/zsh/setup/keybinds.zsh