summaryrefslogtreecommitdiff
path: root/tw/services
diff options
context:
space:
mode:
Diffstat (limited to 'tw/services')
-rw-r--r--tw/services/desktop.scm5
-rw-r--r--tw/services/dns.scm6
-rw-r--r--tw/services/git.scm9
-rw-r--r--tw/services/restic.scm19
4 files changed, 16 insertions, 23 deletions
diff --git a/tw/services/desktop.scm b/tw/services/desktop.scm
index b0bb4e8a..c04b2feb 100644
--- a/tw/services/desktop.scm
+++ b/tw/services/desktop.scm
@@ -72,8 +72,7 @@ background. An initial @code{~/} is replaced with $HOME/.")
(stop #~(make-kill-destructor))))
(define (desktop-layout-services config)
- (match-record config <home-desktop-layout-configuration>
- (desktop-background monitors)
+ (match-record config <home-desktop-layout-configuration> (desktop-background monitors)
(cons* (shepherd-service
(documentation "Set up X displays on login.")
(provision '(xorg-setup))
@@ -91,7 +90,7 @@ background. An initial @code{~/} is replaced with $HOME/.")
(system* #$(file-append xrandr "/bin/xrandr")
#$@(append-map (lambda (monitor)
(match-record monitor <home-monitor-configuration>
- (name xrandr-options)
+ (name xrandr-options)
`("--output" ,name ,@xrandr-options)))
monitors))
;; Set the desktop background picture. Hopefully doing this just after
diff --git a/tw/services/dns.scm b/tw/services/dns.scm
index 684fea5a..ba4da6fe 100644
--- a/tw/services/dns.scm
+++ b/tw/services/dns.scm
@@ -25,8 +25,7 @@ Guile @code{read} calls.")
(ipv6? (boolean #t) "Whether to update the specified host's AAAA record."))
(define (mythic-dynamic-dns-cronjob config api-host)
- (match-record config <mythic-dynamic-dns-configuration>
- (schedule host-name credential-file)
+ (match-record config <mythic-dynamic-dns-configuration> (schedule host-name credential-file)
#~(job #$schedule
#$(program-file (string-append "dynamic-dns-" api-host "-command")
(with-extensions (list guile-json-4 guile-gnutls) ; guile-gnutls needed by (web client)
@@ -58,8 +57,7 @@ Guile @code{read} calls.")
response decoded-body)))))))))
(define (mythic-dynamic-dns-cronjobs config)
- (match-record config <mythic-dynamic-dns-configuration>
- (ipv4? ipv6?)
+ (match-record config <mythic-dynamic-dns-configuration> (ipv4? ipv6?)
(append (if ipv4? (list (mythic-dynamic-dns-cronjob config "ipv4.api.mythic-beasts.com")) '())
(if ipv6? (list (mythic-dynamic-dns-cronjob config "ipv6.api.mythic-beasts.com")) '()))))
diff --git a/tw/services/git.scm b/tw/services/git.scm
index 69dae1e8..168301a5 100644
--- a/tw/services/git.scm
+++ b/tw/services/git.scm
@@ -30,8 +30,7 @@ containing work projects."))
(define (gitconfig-includes identities)
(if (null? identities) '()
- (cons (match-record (car identities) <home-git-identity>
- (name root-directory)
+ (cons (match-record (car identities) <home-git-identity> (name root-directory)
;; A relative path is relative to the gitconfig file.
(format #f "[includeIf \"gitdir:~a/**\"]\n\tpath = ~aconfig"
(string-trim-right root-directory #\/) name))
@@ -39,8 +38,7 @@ containing work projects."))
(define (gitconfig-otherfiles identities)
(if (null? identities) '()
- (cons (match-record (car identities) <home-git-identity>
- (name email signing-key)
+ (cons (match-record (car identities) <home-git-identity> (name email signing-key)
(list
(string-append "git/" name "config")
(plain-file (string-append "git" name "config")
@@ -51,8 +49,7 @@ containing work projects."))
(gitconfig-otherfiles (cdr identities)))))
(define (gitconfig config)
- (match-record config <home-git-configuration>
- (default-email default-signing-key identities)
+ (match-record config <home-git-configuration> (default-email default-signing-key identities)
`(,@(gitconfig-otherfiles identities)
("git/config" ,(mixed-text-file "gitconfig" "\
# This is Git's per-user configuration file.
diff --git a/tw/services/restic.scm b/tw/services/restic.scm
index 7deea24a..f23da013 100644
--- a/tw/services/restic.scm
+++ b/tw/services/restic.scm
@@ -128,8 +128,9 @@ private restic repos.")
(define (restic-server-arguments config)
"Turn CONFIG into a list of arguments to the restic-rest-server executable."
(match-record config <restic-server-configuration>
- (repository-path bind-address htpasswd-file auth? verify-upload? append-only?
- max-repository-size private-repos-only? prometheus? prometheus-auth?)
+ (repository-path bind-address htpasswd-file auth? verify-upload?
+ append-only? max-repository-size private-repos-only?
+ prometheus? prometheus-auth?)
`("--path" ,repository-path
"--listen" ,bind-address
,@(if (string? htpasswd-file) `("--htpasswd-file" ,htpasswd-file) '())
@@ -143,8 +144,7 @@ private restic repos.")
(define (restic-server-service config)
"Create a `shepherd-service' for the restic REST server from CONFIG."
- (match-record config <restic-server-configuration>
- (restic-server user group)
+ (match-record config <restic-server-configuration> (restic-server user group)
(list (shepherd-service
(provision '(restic-server))
(requirement '(networking))
@@ -157,8 +157,7 @@ private restic repos.")
(define (restic-server-accounts config)
"Create user accounts and groups for the restic REST server defined in CONFIG."
- (match-record config <restic-server-configuration>
- (user group repository-path)
+ (match-record config <restic-server-configuration> (user group repository-path)
(list (user-account
(name user)
(group group)
@@ -246,8 +245,9 @@ true."
(define (cronjob config)
(match-record config <restic-scheduled-cleanup>
- (schedule repo password restic user snapshot-host snapshot-paths prune?
- keep-last keep-hourly keep-daily keep-weekly keep-monthly keep-yearly keep-within)
+ (schedule repo password restic user snapshot-host snapshot-paths
+ prune? keep-last keep-hourly keep-daily keep-weekly
+ keep-monthly keep-yearly keep-within)
#~(job #$schedule
#$(program-file
;; Make cron commands for different repos easier to distinguish.
@@ -312,8 +312,7 @@ must be given. Leading @code{~/} are replaced with @code{$HOME}.")
(define (restic-backup-cronjobs configs)
(define (cronjob config)
- (match-record config <restic-scheduled-backup>
- (schedule paths repo password tags restic)
+ (match-record config <restic-scheduled-backup> (schedule paths repo password tags restic)
#~(job #$schedule
#$(program-file "restic-backup-command"
#~(begin