Subject: [bug#76169] home: Add home-restic-backup service.

From: Ludovic Courtès <[email-masked]>
Date: Wed, 05 Mar 2025 19:42:19 +0100

Hi,

Giacomo Leidi <[email-masked]> skribis:

> * gnu/services/backup.scm (restic-backup-configuration): Reimplement
> with (guix records);
> (restic-backup-job-{logfile,command,requirement,modules}): Add new
> procedures and add support for Guix Home environments;
> (restic-backup-job->shepherd-service): Add support for Guix Home
> environments;
> (restic-backup-service-activation): Drop procedure as now the Shepherd
> takes care of creating directories for timers logs.
> * gnu/home/services/backup.scm: New file.
> * gnu/local.mk: Add this.
> * doc/guix.texi: Document this.
>
> Change-Id: Ied1c0a5756b715fba176a0e42ea154246089e6be

Overall LGTM.  However the patch no longer applies; could you send an
updated patch?

Minor comments:

> +@node Backup Home Services
> +@subsection Backup Home Services

The node name is good (it has to be unique), but the subsection name
could simply be “Backup Services”.

> +@lisp
> +(use-modules (gnu services backup)      ;for 'restic-backup-job'

I would suggest #:re-export’ing the commonly needed bits from (gnu home
services backup), to reduce the amount of boilerplate needed, similar to
what (gnu home services dict) does, for example.

> -(define list-of-restic-backup-jobs?
> -  (list-of restic-backup-job?))
> +(define-record-type* <restic-backup-configuration>

You can add a short comment right above to explain, as you proposed, why
‘define-configuration’ is not used.

Thanks,
Ludo’.