index
:
guix
koszko
koszko-scripts
about
summary
refs
log
tree
commit
diff
log msg
author
committer
range ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2021, 2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; 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 <http://www.gnu.org/licenses/>. (define-module (gnu services rsync) #:use-module ((gnu build linux-container) #:select (%namespaces)) #:use-module (gnu services) #:use-module (gnu services base) #:use-module (gnu services shepherd) #:autoload (gnu system file-systems) (file-system-mapping) #:use-module (gnu system shadow) #:use-module (gnu packages admin) #:use-module (gnu packages linux) #:use-module (gnu packages rsync) #:use-module (guix records) #:use-module (guix gexp) #:use-module (guix diagnostics) #:use-module (guix i18n) #:use-module (guix least-authority) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (ice-9 match) #:export (rsync-configuration rsync-configuration? rsync-configuration-modules rsync-module rsync-module? rsync-module-name rsync-module-file-name rsync-module-comment rsync-module-read-only rsync-module-timeout rsync-service-type)) ;;;; Commentary: ;;; ;;; This module implements a service that to run instance of Rsync, ;;; files synchronization tool. ;;; ;;;; Code: (define-with-syntax-properties (warn-share-field-deprecation (value properties)) (unless (unspecified? value) (warning (source-properties->location properties) (G_ "the 'share-path' and 'share-comment' fields is deprecated, \ please use 'modules' instead~%"))) value) (define-record-type* <rsync-configuration> rsync-configuration make-rsync-configuration rsync-configuration? (package rsync-configuration-package ; file-like (default rsync)) (address rsync-configuration-address ; string | #f (default #f)) (port-number rsync-configuration-port-number ; integer (default 873)) (pid-file rsync-configuration-pid-file ; string (default "/var/run/rsyncd/rsyncd.pid")) (lock-file rsync-configuration-lock-file ; string (default "/var/run/rsyncd/rsyncd.lock")) (log-file rsync-configuration-log-file ; string (default "/var/log/rsyncd.log")) (use-chroot? rsync-configuration-use-chroot? ; boolean (sanitize warn-share-field-deprecation) (default *unspecified*)) (modules rsync-configuration-actual-modules ;list of <rsync-module> (default %default-modules)) ;TODO: eventually remove default (share-path rsync-configuration-share-path ; string (sanitize warn-share-field-deprecation) (default *unspecified*)) (share-comment rsync-configuration-share-comment ; string (sanitize warn-share-field-deprecation) (default *unspecified*)) (read-only? rsync-configuration-read-only? ; boolean (sanitize warn-share-field-deprecation) (default *unspecified*)) (timeout rsync-configuration-timeout ; integer (sanitize warn-share-field-deprecation) (default *unspecified*)) (user rsync-configuration-user ; string (default "root")) (group rsyn