From c3ef6ab1a62cf23cd15fd8865ec6bcdf8e7e4ad7 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Sun, 5 Nov 2023 00:32:41 +0100 Subject: Fix `match-record' indentation --- tw/services/desktop.scm | 5 ++--- tw/services/dns.scm | 6 ++---- tw/services/git.scm | 9 +++------ tw/services/restic.scm | 19 +++++++++---------- 4 files changed, 16 insertions(+), 23 deletions(-) (limited to 'tw') 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 - (desktop-background monitors) + (match-record config (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 - (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 - (schedule host-name credential-file) + (match-record config (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 - (ipv4? ipv6?) + (match-record config (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) - (name root-directory) + (cons (match-record (car identities) (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) - (name email signing-key) + (cons (match-record (car identities) (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 - (default-email default-signing-key identities) + (match-record config (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 - (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 user group) + (match-record config (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 - (user group repository-path) + (match-record config (user group repository-path) (list (user-account (name user) (group group) @@ -246,8 +245,9 @@ true." (define (cronjob config) (match-record config - (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 - (schedule paths repo password tags restic) + (match-record config (schedule paths repo password tags restic) #~(job #$schedule #$(program-file "restic-backup-command" #~(begin -- cgit v1.2.3