;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2024 Giacomo Leidi ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu services backup) #:use-module (gnu packages backup) #:use-module (gnu services) #:use-module (gnu services configuration) #:use-module (gnu services mcron) #:use-module (guix build-system copy) #:
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-01-02 21:40:44 +0100
committerRicardo Wurmus <rekado@elephly.net>2024-01-02 21:40:44 +0100
commitfb3ac987c94e0a77b5c39913dace0b565afc3291 (patch)
tree838323cb1756556805434ff030336c6560dde74d /gnu/bootloader.scm
parente8814809c2de6fe2f23169775207b3d2e537724f (diff)
downloadguix-fb3ac987c94e0a77b5c39913dace0b565afc3291.tar.gz
guix-fb3ac987c94e0a77b5c39913dace0b565afc3291.zip
gnu: Add r-wasabi.
* gnu/packages/bioinformatics.scm (r-wasabi): New variable. Change-Id: I5ce6c47f1fb3b1d5dfedd0977e53cb70ce379077
Diffstat (limited to 'gnu/bootloader.scm')
(validate-args args) (define action (second args)) (match action ("backup" (backup args)) (_ (error (string-append "Unknown action: " action))))) (main (command-line))))) (define (restic-backup-job->mcron-job config) (let ((user (restic-backup-job-user config)) (schedule (restic-backup-job-schedule config)) (name (restic-backup-job-name config))) #~(job #$schedule #$(string-append "restic-guix backup " name) #:user #$user))) (define (restic-guix-wrapper-package jobs) (package (name "restic-backup-service-wrapper") (version "0.0.0") (source (restic-guix jobs)) (build-system copy-build-system) (arguments (list #:install-plan #~'(("./" "/bin")))) (home-page "https://restic.net") (synopsis "Easily interact from the CLI with Guix configured backups") (description "This package provides a simple wrapper around @code{restic}, handled by the @code{restic-backup-service-type}. It allows for easily interacting with Guix configured backup jobs, for example for manually triggering a backup without waiting for the scheduled job to run.") (license license:gpl3+))) (define restic-backup-service-profile (lambda (config) (define jobs (restic-backup-configuration-jobs config)) (if (> (length jobs) 0) (list (restic-guix-wrapper-package jobs)) '()))) (define restic-backup-service-type (service-type (name 'restic-backup) (extensions (list (service-extension profile-service-type restic-backup-service-profile) (service-extension mcron-service-type (lambda (config) (map restic-backup-job->mcron-job (restic-backup-configuration-jobs config)))))) (compose concatenate) (extend (lambda (config jobs) (restic-backup-configuration (inherit config) (jobs (append (restic-backup-configuration-jobs config) jobs))))) (default-value (restic-backup-configuration)) (description "This service configures @code{mcron} jobs for running backups with @code{restic}.")))