]> git.immae.eu Git - perso/Immae/Config/dotdrop.git/commitdiff
Add gnupg configuration
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 22 Oct 2018 06:12:12 +0000 (08:12 +0200)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Mon, 22 Oct 2018 06:15:05 +0000 (08:15 +0200)
config.yaml
dotfiles/gnupg/config_files/gnupg/gpg-agent.conf [new file with mode: 0644]
dotfiles/gnupg/config_files/gnupg/gpg.conf [new file with mode: 0644]
dotfiles/gnupg/systemd/dirmngr_override.conf [new file with mode: 0644]
dotfiles/gnupg/systemd/gpg_agent_browser_override.conf [new file with mode: 0644]
dotfiles/gnupg/systemd/gpg_agent_extra_override.conf [new file with mode: 0644]
dotfiles/gnupg/systemd/gpg_agent_override.conf [new file with mode: 0644]
dotfiles/gnupg/systemd/gpg_agent_ssh_override.conf [new file with mode: 0644]
dotfiles/shell_bash/bashrc

index 066b9dd2a691d27ccc4f07e0c6d9f5f5f693b430..f33b6ebcce30206b6bff5c27bb6d23fb4e0cf925 100644 (file)
@@ -49,6 +49,49 @@ dotfiles:
     - make_git_dirs
     dst: ~/.config
     src: git/config_files
+  gnupg_config_files:
+    dst: ~/.config
+    src: gnupg/config_files
+  gnupg_systemd_browser_override:
+    actions:
+    - systemd_daemon_reload
+    - systemd_restart gpg-agent-browser.socket
+    dst: ~/.config/systemd/user/gpg-agent-browser.socket.d/override.conf
+    src: gnupg/systemd/gpg_agent_browser_override.conf
+    trans:
+    - gpg_socket_dir
+  gnupg_systemd_dirmngr_override:
+    actions:
+    - systemd_daemon_reload
+    - systemd_restart dirmngr.socket
+    dst: ~/.config/systemd/user/dirmngr.socket.d/override.conf
+    src: gnupg/systemd/dirmngr_override.conf
+    trans:
+    - gpg_socket_dir
+  gnupg_systemd_extra_override:
+    actions:
+    - systemd_daemon_reload
+    - systemd_restart gpg-agent-extra.socket
+    dst: ~/.config/systemd/user/gpg-agent-extra.socket.d/override.conf
+    src: gnupg/systemd/gpg_agent_extra_override.conf
+    trans:
+    - gpg_socket_dir
+  gnupg_systemd_override:
+    actions:
+    - systemd_daemon_reload
+    - systemd_restart gpg-agent.socket
+    dst: ~/.config/systemd/user/gpg-agent.socket.d/override.conf
+    src: gnupg/systemd/gpg_agent_override.conf
+    trans:
+    - gpg_socket_dir
+  gnupg_systemd_ssh_override:
+    actions:
+    - systemd_daemon_reload
+    - systemd_restart gpg-agent-ssh.socket
+    dst: ~/.config/systemd/user/gpg-agent-ssh.socket.d/override.conf
+    src: gnupg/systemd/gpg_agent_ssh_override.conf
+    trans:
+    - gpg_socket_dir
   graphical_config_files:
     actions:
     - make_xorg_link
@@ -131,6 +174,14 @@ profiles:
   _git:
     dotfiles:
     - git_config_files
+  _gnupg:
+    dotfiles:
+    - gnupg_config_files
+    - gnupg_systemd_browser_override
+    - gnupg_systemd_extra_override
+    - gnupg_systemd_ssh_override
+    - gnupg_systemd_override
+    - gnupg_systemd_dirmngr_override
   _graphical:
     dotfiles:
     - graphical_config_files
@@ -164,6 +215,7 @@ profiles:
     - pam_environment
     include:
     - _git
+    - _gnupg
     - _fretlink
     - _lxde
     - _shell_bash
@@ -173,6 +225,8 @@ profiles:
     - pam_environment
 trans:
   gpg: gpg2 -q --for-your-eyes-only --no-tty -d {0} > {1}
+  gpg_socket_dir: sed -e "s/<<<>>>/$(gpgconf --list-dirs socketdir | cut -d'/' -f6)/"
+    {0} > {1}
 variables:
   features:
     flony:
diff --git a/dotfiles/gnupg/config_files/gnupg/gpg-agent.conf b/dotfiles/gnupg/config_files/gnupg/gpg-agent.conf
new file mode 100644 (file)
index 0000000..da0291a
--- /dev/null
@@ -0,0 +1,3 @@
+pinentry-program /usr/bin/pinentry-curses
+allow-loopback-pinentry
+enable-ssh-support
diff --git a/dotfiles/gnupg/config_files/gnupg/gpg.conf b/dotfiles/gnupg/config_files/gnupg/gpg.conf
new file mode 100644 (file)
index 0000000..17bc522
--- /dev/null
@@ -0,0 +1,7 @@
+# Main signing key
+default-key  DB1CFE90
+
+default-recipient-self
+encrypt-to 0326A611
+auto-key-retrieve
+no-greeting
diff --git a/dotfiles/gnupg/systemd/dirmngr_override.conf b/dotfiles/gnupg/systemd/dirmngr_override.conf
new file mode 100644 (file)
index 0000000..8b149b7
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+ListenStream=%t/gnupg/<<<>>>/S.dirmngr
diff --git a/dotfiles/gnupg/systemd/gpg_agent_browser_override.conf b/dotfiles/gnupg/systemd/gpg_agent_browser_override.conf
new file mode 100644 (file)
index 0000000..af354a8
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+ListenStream=%t/gnupg/<<<>>>/S.gpg-agent.browser
diff --git a/dotfiles/gnupg/systemd/gpg_agent_extra_override.conf b/dotfiles/gnupg/systemd/gpg_agent_extra_override.conf
new file mode 100644 (file)
index 0000000..ee36d77
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+ListenStream=%t/gnupg/<<<>>>/S.gpg-agent.extra
diff --git a/dotfiles/gnupg/systemd/gpg_agent_override.conf b/dotfiles/gnupg/systemd/gpg_agent_override.conf
new file mode 100644 (file)
index 0000000..ee23ad2
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+ListenStream=%t/gnupg/<<<>>>/S.gpg-agent
diff --git a/dotfiles/gnupg/systemd/gpg_agent_ssh_override.conf b/dotfiles/gnupg/systemd/gpg_agent_ssh_override.conf
new file mode 100644 (file)
index 0000000..8cadc91
--- /dev/null
@@ -0,0 +1,3 @@
+[Socket]
+ListenStream=
+ListenStream=%t/gnupg/<<<>>>/S.gpg-agent.ssh
index 8f4328339bf63ecd688dbbfafc6941af4c1fbd19..9b74341697957240785ee41f0abb9ef9c2b19f5f 100644 (file)
@@ -9,6 +9,7 @@ fi
 # If not running interactively, don't do anything
 [[ $- != *i* ]] && return
 
+export GPG_TTY=$(tty)
 export HISTFILE="$XDG_STATE_HOME/bash/history"
 
 alias vi=vim