summaryrefslogtreecommitdiff
path: root/tw/home
diff options
context:
space:
mode:
authorTimo Wilken2023-09-12 19:42:21 +0200
committerTimo Wilken2023-09-12 21:18:32 +0200
commitd44b9efda2d387430e63c1d6cd426c88bcde2eda (patch)
treedb7973a37a88c439362e7311148e7275d27352fa /tw/home
parent340d839c2c4ff47ce047e63969c43393b7a335dc (diff)
Factor out proper Git and GnuPG service types
Diffstat (limited to 'tw/home')
-rw-r--r--tw/home/cern.scm15
-rw-r--r--tw/home/lap.scm22
2 files changed, 30 insertions, 7 deletions
diff --git a/tw/home/cern.scm b/tw/home/cern.scm
index f0dc7214..8c6ed7d5 100644
--- a/tw/home/cern.scm
+++ b/tw/home/cern.scm
@@ -30,6 +30,8 @@
#:use-module (tw packages catppuccin)
#:use-module (tw packages xorg)
#:use-module (tw gexp)
+ #:use-module (tw services git)
+ #:use-module (tw services gnupg)
#:use-module (tw theme))
(use-package-modules calendar dav mail web-browsers xdisorg xorg)
@@ -128,11 +130,18 @@
"/X11/ridge-view.jpg")))))))
;; On my work machine, Git must always use my work PGP key.
- (gitconfig "timo.wilken@cern.ch" "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C")
+ (service home-git-service-type
+ (home-git-configuration
+ (default-email "timo.wilken@cern.ch")
+ (default-signing-key "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C")))
(openssh-service #f)
- (append %common-services %interactive-services pim-services
- (gnupg-services "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C" #:gui-pinentry? #t))))))
+ (service home-gnupg-service-type
+ (home-gnupg-configuration
+ (default-key "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C")
+ (gui-pinentry? #t)))
+
+ (append %common-services %interactive-services pim-services)))))
%cern-home
diff --git a/tw/home/lap.scm b/tw/home/lap.scm
index c166c75e..ae5fb629 100644
--- a/tw/home/lap.scm
+++ b/tw/home/lap.scm
@@ -38,6 +38,8 @@
#:use-module ((nongnu packages steam-client)
#:select (steam))
#:use-module (tw home)
+ #:use-module (tw services git)
+ #:use-module (tw services gnupg)
#:use-module (tw packages scanner)
#:use-module (tw services restic)
#:use-module (tw theme))
@@ -202,12 +204,24 @@
;; On my private machine, I want to use my private PGP key normally, and
;; my work key only for work repositories.
- (gitconfig "git@twilken.net" "53EC3C06856883DD92355BC22FC78504681F69B0"
- '("cern" "~/src/alice" "timo.wilken@cern.ch" "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C"))
+ (service home-git-service-type
+ (home-git-configuration
+ (default-email "git@twilken.net")
+ (default-signing-key "53EC3C06856883DD92355BC22FC78504681F69B0")
+ (identities
+ (list (home-git-identity
+ (name "cern")
+ (root-directory "~/src/alice")
+ (email "timo.wilken@cern.ch")
+ (signing-key "C2249BBE5E8761C943A0CFA1B7B3914BF63ACD7C"))))))
(openssh-service #t)
- (append pim-services %interactive-services %common-services
- (gnupg-services "53EC3C06856883DD92355BC22FC78504681F69B0" #:gui-pinentry? #t))))))
+ (service home-gnupg-service-type
+ (home-gnupg-configuration
+ (default-key "53EC3C06856883DD92355BC22FC78504681F69B0")
+ (gui-pinentry? #t)))
+
+ (append pim-services %interactive-services %common-services)))))
%lap-home