aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrumeet <17158086+Trumeet@users.noreply.github.com>2019-11-10 13:21:11 -0800
committerTrumeet <17158086+Trumeet@users.noreply.github.com>2019-11-10 13:21:11 -0800
commit05ddb2490db99af1619284f3bbc0c1a960ff6b22 (patch)
tree14122f88a3901f3549cbe6997dd484fa3eb56657
parent6cd0a898643f927edf8cb4abc94f217fa9647447 (diff)
downloaddotfiles-05ddb2490db99af1619284f3bbc0c1a960ff6b22.tar
dotfiles-05ddb2490db99af1619284f3bbc0c1a960ff6b22.tar.gz
dotfiles-05ddb2490db99af1619284f3bbc0c1a960ff6b22.tar.bz2
dotfiles-05ddb2490db99af1619284f3bbc0c1a960ff6b22.zip
feat: use GnuPG as ssh agent
-rw-r--r--README.md4
-rw-r--r--ssh-agent/.config/systemd/user/gpg-agent.service11
-rw-r--r--ssh-agent/.gnupg/gpg-agent.conf1
-rw-r--r--ssh-agent/.pam_environment2
4 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index fb8ac1a..4545d11 100644
--- a/README.md
+++ b/README.md
@@ -11,6 +11,7 @@
* IDE: Android Studio and / or IntelliJ Idea
* Desktop: KDE
* Input: iBus + Rime (Chinese, Luna Pinyin Simp + Jyutping)
+* SSH Agent: GnuPG
## Setup
@@ -32,6 +33,7 @@ $> stow nvim
# You will see an error after executing this. Just ignore it and restart NeoVim.
$> nvim -c "PlugInstall"
$> stow rime
+$> stow ssh-agent
```
3. Enjoy
@@ -40,7 +42,7 @@ Wait... you are **NOT** supposed to enjoy it because they are my **PERSONAL** co
# Acknowledgements
-Other users' dotfile repos, StackOverflow, Google, GitHub, etc.
+Other users' dotfile repos, StackOverflow, Google, GitHub, Arch Wiki, etc.
# License
diff --git a/ssh-agent/.config/systemd/user/gpg-agent.service b/ssh-agent/.config/systemd/user/gpg-agent.service
new file mode 100644
index 0000000..69c7bb6
--- /dev/null
+++ b/ssh-agent/.config/systemd/user/gpg-agent.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=GnuPG private key agent
+IgnoreOnIsolate=true
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/gpg-agent --daemon
+Restart=on-abort
+
+[Install]
+WantedBy=default.target
diff --git a/ssh-agent/.gnupg/gpg-agent.conf b/ssh-agent/.gnupg/gpg-agent.conf
new file mode 100644
index 0000000..85405bc
--- /dev/null
+++ b/ssh-agent/.gnupg/gpg-agent.conf
@@ -0,0 +1 @@
+enable-ssh-support
diff --git a/ssh-agent/.pam_environment b/ssh-agent/.pam_environment
new file mode 100644
index 0000000..b55fba7
--- /dev/null
+++ b/ssh-agent/.pam_environment
@@ -0,0 +1,2 @@
+SSH_AGENT_PID DEFAULT=
+SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"