diff options
author | Timo Wilken | 2023-01-19 22:57:08 +0100 |
---|---|---|
committer | Timo Wilken | 2023-01-19 22:57:08 +0100 |
commit | aff5b25860a9dd93b4038548fefcc27d85f201b6 (patch) | |
tree | 23253e4a7b3d8b3d640db8470e01c86d5c9821e6 /tw/home/common.scm | |
parent | a573a32b870466b5ffeb05ded536e6358b4a403f (diff) |
Allow specifying non-GUI pinentry program
On servers, I want to use pinentry-tty instead.
Diffstat (limited to 'tw/home/common.scm')
-rw-r--r-- | tw/home/common.scm | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/tw/home/common.scm b/tw/home/common.scm index 622b54cc..4aee687c 100644 --- a/tw/home/common.scm +++ b/tw/home/common.scm @@ -32,33 +32,18 @@ zsh zsh-autosuggestions zsh-syntax-highlighting zsh-autopair zsh-completions)) -(define-public common-services +(export gnupg-services) ; there doesn't seem to be a `define*-public' macro +(define* (gnupg-services #:key gui-pinentry?) (list - (service home-zsh-service-type - (home-zsh-configuration - (zshrc (list (local-file "files/zshrc") - (local-file "files/prompt.zsh"))))) - - (simple-service 'common-config home-xdg-configuration-files-service-type - `(("git/config" ,(local-file "files/gitconfig")) - ("htop/htoprc" ,(local-file "files/htoprc")) - ("lesskey" ,(local-file "files/lesskey")) - ("ranger/rc.conf" ,(local-file "files/ranger.conf")) - ("tmux/tmux.conf" ,(local-file "files/tmux.conf")) - ("user-dirs.locale" ,(plain-file "user-dirs.locale" "C")) ; Not sure if this is needed. Arch has it. - ("user-dirs.dirs" ,(local-file "files/user-dirs.dirs")))) - - (simple-service 'common-scripts home-files-service-type - ;; With #:recursive? #t, Guix keeps the files' permission bits, i.e. makes them executable. - `((".local/bin/ppscm" ,(local-file "files/ppscm" #:recursive? #t)))) ; pretty-print scheme files - (simple-service 'gnupg-config home-files-service-type `(;; GnuPG config files must be in ~/.local/share/gnupg, not ~/.config, ;; so we can't use `home-xdg-configuration-files-service-type'. (".local/share/gnupg/gpg.conf" ,(local-file "files/gpg.conf")) (".local/share/gnupg/gpg-agent.conf" ,(mixed-text-file "gpg-agent.conf" "\ -pinentry-program " (file-append pinentry-rofi "/bin/pinentry-rofi") " +pinentry-program " (if gui-pinentry? + (file-append pinentry-rofi "/bin/pinentry-rofi") + (file-append pinentry-tty "/bin/pinentry-tty")) " # Needed if spawning lots of parallel gpg --decrypt processes. https://dev.gnupg.org/T3530 auto-expand-secmem ")))) @@ -72,7 +57,27 @@ auto-expand-secmem (invoke #$(file-append gnupg "/bin/gpg-agent") "--daemon" "--no-detach"))) (stop #~(lambda _ - (invoke "gpg-connect-agent" "killagent" "/bye")))))) + (invoke "gpg-connect-agent" "killagent" "/bye")))))))) + +(define-public common-services + (list + (service home-zsh-service-type + (home-zsh-configuration + (zshrc (list (local-file "files/zshrc") + (local-file "files/prompt.zsh"))))) + + (simple-service 'common-config home-xdg-configuration-files-service-type + `(("git/config" ,(local-file "files/gitconfig")) + ("htop/htoprc" ,(local-file "files/htoprc")) + ("lesskey" ,(local-file "files/lesskey")) + ("ranger/rc.conf" ,(local-file "files/ranger.conf")) + ("tmux/tmux.conf" ,(local-file "files/tmux.conf")) + ("user-dirs.locale" ,(plain-file "user-dirs.locale" "C")) ; Not sure if this is needed. Arch has it. + ("user-dirs.dirs" ,(local-file "files/user-dirs.dirs")))) + + (simple-service 'common-scripts home-files-service-type + ;; With #:recursive? #t, Guix keeps the files' permission bits, i.e. makes them executable. + `((".local/bin/ppscm" ,(local-file "files/ppscm" #:recursive? #t)))) ; pretty-print scheme files (simple-service 'common-environment home-environment-variables-service-type `(;; Path to my own package definitions. If invoking `guix home' |