aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-10-29 17:09:08 -0300
committerEuAndreh <eu@euandre.org>2022-10-29 17:09:08 -0300
commit9d29a579a99fe07666c70ff02b71fc21469d450b (patch)
tree985b1ed0d970f8f2c8857faf498be1fcb39f9e86
parentGenerate etc/git/config-extra from Makefile instead of Guix Home (diff)
downloaddotfiles-9d29a579a99fe07666c70ff02b71fc21469d450b.tar.gz
dotfiles-9d29a579a99fe07666c70ff02b71fc21469d450b.tar.xz
Generate etc/gnupg/gpg-agent.conf from Makefile instead of Guix Home
-rw-r--r--Makefile6
-rw-r--r--etc/gnupg/gpg-agent.conf.tmpl6
-rw-r--r--etc/guix/home.scm27
3 files changed, 12 insertions, 27 deletions
diff --git a/Makefile b/Makefile
index 2c43852..848a3f3 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@ derived-assets = \
$(pod2man) \
$(XDG_CONFIG_HOME)/ssh/id_rsa.pub \
$(XDG_CONFIG_HOME)/git/config-extra \
+ $(XDG_CONFIG_HOME)/gnupg/gpg-agent.conf \
$(XDG_CONFIG_HOME)/alot/config \
$(XDG_CONFIG_HOME)/mbsync/config \
$(XDG_CONFIG_HOME)/msmtp/config \
@@ -61,6 +62,11 @@ $(XDG_CONFIG_HOME)/git/config-extra:
printf '[sendemail]\n smtpserver = ' > $@
command -v msmtpq >> $@
+$(XDG_CONFIG_HOME)/gnupg/gpg-agent.conf: $(XDG_CONFIG_HOME)/gnupg/gpg-agent.conf.tmpl
+ cp $(XDG_CONFIG_HOME)/gnupg/gpg-agent.conf.tmpl $@
+ printf 'pinentry-program ' >> $@
+ command -v pinentry-gtk-2 >> $@
+
$(XDG_DATA_HOME)/euandreh/e.list.txt: ~/Documents/txt/ opt/aux/gen-e-list.sh
sh opt/aux/gen-e-list.sh > $@
diff --git a/etc/gnupg/gpg-agent.conf.tmpl b/etc/gnupg/gpg-agent.conf.tmpl
new file mode 100644
index 0000000..e772820
--- /dev/null
+++ b/etc/gnupg/gpg-agent.conf.tmpl
@@ -0,0 +1,6 @@
+# 2592000 = 60 * 60 * 24 * 30
+default-cache-ttl 172800
+default-cache-ttl-ssh 172800
+max-cache-ttl 2592000
+max-cache-ttl-ssh 2592000
+enable-ssh-support
diff --git a/etc/guix/home.scm b/etc/guix/home.scm
index 05e9d86..53937d0 100644
--- a/etc/guix/home.scm
+++ b/etc/guix/home.scm
@@ -1,7 +1,6 @@
(use-modules
((ice-9 textual-ports) #:prefix textual-ports:)
((guix licenses) #:prefix licenses:)
- ((srfi srfi-1) #:prefix s1:)
((xyz euandreh heredoc) #:prefix heredoc:)
(gnu home)
(gnu home services)
@@ -172,31 +171,6 @@
(define (xdg-config-home s)
(string-append (getenv "XDG_CONFIG_HOME") "/" s))
-;; 2592000 = 60 * 60 * 24 * 30
-(define gpg-agent.conf
- (mixed-text-file "gpg-agent.conf" #"-
- default-cache-ttl 172800
- default-cache-ttl-ssh 172800
- max-cache-ttl 2592000
- max-cache-ttl-ssh 2592000
- enable-ssh-support
- pinentry-program "# pinentry-gtk2 "/bin/pinentry-gtk-2\n"))
-
-(define config-files
- `(("gnupg/gpg-agent.conf" ,gpg-agent.conf)))
-
-(define dot-config
- (let ((prefix-with-config
- (lambda (s)
- (string-append (substring (getenv "XDG_CONFIG_HOME")
- (+ 1 (string-length (getenv "HOME"))))
- "/"
- s))))
- (map (lambda (t)
- (list (prefix-with-config (s1:first t))
- (s1:second t)))
- config-files)))
-
(define (slurp name)
(string-trim-both
@@ -568,7 +542,6 @@
(service poweralertd-service-type)
(simple-service 'my-shell-profile home-shell-profile-service-type
(list (plain-file "my-profile" ". ~/.usr/etc/sh/rc")))
- (simple-service 'config-files home-files-service-type dot-config)
(service home-mcron-service-type
(home-mcron-configuration
(jobs cronjobs))))))