aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/syncthing.scm
blob: 7c3d5b027dcf9198a0391af58d7eae323e83806a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Oleg Pykhalov <go.wigust@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 syncthing)
  #:use-module (gnu packages syncthing)
  #:use-module (gnu services)
  #:use-module (gnu services shepherd)
  #:use-module (guix gexp)
  #:use-module (guix records)
  #:use-module (ice-9 match)
  #:use-module (srfi srfi-1)
  #:export (syncthing-configuration
            syncthing-configuration?
            syncthing-service-type))

;;; Commentary:
;;;
;;; This module provides a service definition for the syncthing service.
;;;
;;; Code:

(define-record-type* <syncthing-configuration>
  syncthing-configuration make-syncthing-configuration
  syncthing-configuration?
  (syncthing syncthing-configuration-syncthing ;file-like
             (default syncthing))
  (arguments syncthing-configuration-arguments ;list of strings
             (default '()))
  (logflags  syncthing-configuration-logflags  ;number
             (default 0))
  (user      syncthing-configuration-user      ;string
             (default #f))
  (group     syncthing-configuration-group     ;string
             (default "users"))
  (home      syncthing-configuration-home      ;string
             (default #f)))

(define syncthing-shepherd-service
  (match-lambda
    (($ <syncthing-configuration> syncthing arguments logflags user group home)
     (list
      (shepherd-service
       (provision (list (string->symbol (string-append "syncthing-" user))))
       (documentation "Run syncthing.")
       (requirement '(loopback))
       (start #~(make-forkexec-constructor
                 (append (list (string-append #$syncthing "/bin/syncthing")
                               "-no-browser"
                               "-no-restart"
                               (string-append "-logflags=" (number->string #$logflags)))
                         '#$arguments)
                 #:user #$user
                 #:group #$group
                 #:environment-variables
                 (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user))))
                               "SSL_CERT_DIR=/etc/ssl/certs"
                               "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt")
                         (remove (lambda (str)
                                   (or (string-prefix? "HOME=" str)
                                       (string-prefix? "SSL_CERT_DIR=" str)
                                       (string-prefix? "SSL_CERT_FILE=" str)))
                                 (environ)))))
       (respawn? #f)
       (stop #~(make-kill-destructor)))))))

(define syncthing-service-type
  (service-type (name 'syncthing)
                (extensions (list (service-extension shepherd-root-service-type
                                                     syncthing-shepherd-service)))
                (description
                 "Run @uref{https://github.com/syncthing/syncthing, Syncthing}
decentralized continuous file system synchronization.")))

;;; syncthing.scm ends here
9-01-25 13:59:53 +0100'>2019-01-25gnu: python2-pyqt-4: Use INVOKE....* gnu/packages/qt.scm (python2-pyqt-4)[arguments]: Use INVOKE. Ricardo Wurmus 2019-01-25gnu: qwt: Use INVOKE....* gnu/packages/qt.scm (qwt)[arguments]: Use INVOKE. Ricardo Wurmus 2019-01-21gnu: qscintilla: Update to 2.10.8....* gnu/packages/qt.scm (qscintilla): Update to 2.10.8. (python-qscintilla)[arguments]: Update custom 'configure phase. Efraim Flashner 2019-01-21gnu: python-pyqt: Update to 5.11.3....* gnu/packages/qt.scm (python-pyqt): Update to 5.11.3. * gnu/packages/patches/pyqt-public-sip: Update patch. Efraim Flashner 2019-01-21gnu: python-sip: Update to 4.19.13....* gnu/packages/qt.scm (python-sip): Update to 4.19.13. Efraim Flashner 2019-01-21gnu: qt: Update to 5.11.3....* gnu/packages/qt.scm (qt, qtbase, qtsvg, qtimageformats, qtx11extras, qtxmlpatterns, qtdeclarative, qtconnectivity, qtwebsockets, qtsensors, qtmultimedia, qtwayland, qtserialport, qtserialbus, qtwebchannel qtwebglplugin, qtwebview, qtlocation, qttools, qtscript, qtquickcontrols, qtquickcontrols2, qtgraphicaleffects, qtscxml, qtgamepad, qtpurchasing, qtcanvas3d, qtcharts, qtdatavis3d, qtnetworkauth, qtremoteobjects, qtspeech): Update to 5.11.3. (qt)[source]: Remove patch. * gnu/packages/patches/qt-5-renameat2.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Efraim Flashner 2019-01-16gnu: Move sqlite to separate module....* gnu/packages/databases.scm (sqlite, sqlite-3.26.0, sqlite-with-fts5, sqlite-with-column-metadata): Move variables from here... * gnu/packages/sqlite.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/apl.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/code.scm, gnu/packages/crypto.scm, gnu/packages/databases.scm, gnu/packages/dc.scm, gnu/packages/disk.scm, gnu/packages/ebook.scm, gnu/packages/education.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/file-systems.scm, gnu/packages/freedesktop.scm, gnu/packages/ftp.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/gps.scm, gnu/packages/guile.scm, gnu/packages/ibus.scm, gnu/packages/kerberos.scm, gnu/packages/kodi.scm, gnu/packages/lisp.scm, gnu/packages/mail.scm, gnu/packages/messaging.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nfs.scm, gnu/packages/ocaml.scm, gnu/packages/package-management.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/php.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/ruby.scm, gnu/packages/scheme.scm, gnu/packages/sync.scm, gnu/packages/syndication.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/web-browsers.scm, gnu/packages/webkit.scm: Adjust module references. Ricardo Wurmus 2019-01-15gnu: Separate Python core packages from the rest....* gnu/packages/python.scm: Move hundreds of package definitions from here... * gnu/packages/python-xyz.scm: ...to this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/android.scm, gnu/packages/audio.scm, gnu/packages/backup.scm, gnu/packages/benchmark.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/calendar.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/cluster.scm, gnu/packages/compression.scm, gnu/packages/connman.scm, gnu/packages/crypto.scm, gnu/packages/cups.scm, gnu/packages/databases.scm, gnu/packages/dav.scm, gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/docker.scm, gnu/packages/ebook.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/enlightenment.scm, gnu/packages/finance.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/freedesktop.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/geo.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnupg.scm, gnu/packages/gnuzilla.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/gtk.scm, gnu/packages/ham-radio.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/irc.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/kde-frameworks.scm, gnu/packages/key-mon.scm, gnu/packages/libffi.scm, gnu/packages/libreoffice.scm, gnu/packages/libusb.scm, gnu/packages/lirc.scm, gnu/packages/logging.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/mate.scm, gnu/packages/maths.scm, gnu/packages/medical.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mp3.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/nutrition.scm, gnu/packages/openldap.scm, gnu/packages/openstack.scm, gnu/packages/package-management.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/photo.scm, gnu/packages/polkit.scm, gnu/packages/protobuf.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/qt.scm, gnu/packages/rdf.scm, gnu/packages/ruby.scm, gnu/packages/search.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/simulation.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/storage.scm, gnu/packages/sync.scm, gnu/packages/terminals.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tls.scm, gnu/packages/tor.scm, gnu/packages/tryton.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/virtualization.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wicd.scm, gnu/packages/xdisorg.scm, gnu/packages/xorg.scm: Update module references. Ricardo Wurmus 2019-01-07gnu: Remove unnecessary build-side module imports....* gnu/packages/batik.scm, gnu/packages/boost.scm, gnu/packages/calendar.scm, gnu/packages/gl.scm, gnu/packages/lua.scm, gnu/packages/qt.scm, gnu/packages/simulation.scm, gnu/packages/terminals.scm: Remove unnecessary import of (guix build utils). * gnu/packages/emacs.scm: Remove unnecessary imports of (guix ...). * gnu/packages/libcanberra.scm: Use (srfi srfi-1) instead of (guix build utils) for 'alist-delete'. * gnu/packages/wxwidgets.scm: Likewise. Ludovic Courtès 2019-01-02gnu: qtkeychain: Update to 0.9.1....* gnu/packages/qt.scm (qtkeychain): Update to 0.9.1. [source]: Use 'git-fetch'. [arguments]: Update custom 'set-qt-trans-dir phase. Efraim Flashner 2018-11-29Merge branch 'master' into core-updatesMarius Bakke 2018-11-26qtwebkit: Reduce RAM requirements for linking....* gnu/packages/qt.scm (qtwebkit)[arguments]: Link shared libraries and executables with "--no-keep-memory". Eric Bavier 2018-11-26qtwebkit: Fix pri install directory....* gnu/packages/qt.scm (qtwebkit)[arguments]: Add "ECM_MKSPECS_INSTALL_DIR" to #:configure-flags. Eric Bavier 2018-11-18gnu: qt@5: Fix build failure on glibc 2.28....* gnu/packages/patches/qt-5-renameat2.patch: New file. * gnu/packages/qt.scm (qt)[source]: Use it. * gnu/local.mk (dist_patch_DATA): Add it. Ludovic Courtès 2018-11-06gnu: qtbase: Remove obsolete patch....This patch is no longer needed since 7930cfc98923eda64ec4a37d56b19f96f86f5f59 was merged to core-updates. * gnu/packages/patches/qtbase-glibc-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/qt.scm (qtbase)[source](patches): Drop it. Marius Bakke 2018-11-05Merge branch 'master' into core-updatesMarius Bakke 2018-10-28gnu: qt@4: Use invoke....* gnu/packages/qt.scm (qt@4)[arguments]: Use invoke. Efraim Flashner 2018-10-28gnu: qt@4: Update build config....* gnu/packages/qt.scm (qt@4)[arguments]: Substitute hardcoded '/bin/ls' invocation. Add configure-flags to not build the examples or demos. Don't use the precompiled headers. Efraim Flashner 2018-10-28gnu: qt: Use invoke....* gnu/packages/qt.scm (qt)[arguments]: Use invoke. Efraim Flashner 2018-10-28gnu: qt: Add vulkan support....* gnu/packages/qt.scm (qt, qtbase)[native-inputs]: Add vulkan-headers. (qt@4)[native-inputs]: Don't add vulkan-headers. (qttools)[native-inputs]: Add vulkan-headers. Efraim Flashner 2018-10-28gnu: qt: Use system sqlite....* gnu/packages/databases.scm (sqlite-with-column-metadata): New variable. * gnu/packages/qt.scm (qt, qtbase)[source]: Remove bundled sqlite. [inputs]: Add sqlite-with-column-metadata. [arguments]: Add configure-flag to use system sqlite. Efraim Flashner 2018-10-28gnu: qt: Update to 5.11.2....* gnu/packages/qt.scm (qt, qtbase, qtsvg, qtimageformats, qtx11extras, qtxmlpatterns, qtdeclarative, qtconnectivity, qtwebsockets, qtsensors, qtmultimedia, qtwayland, qtserialport, qtserialbus, qtwebchannel, qtwebglplugin, qtwebview, qtlocation, qttools, qtscript, qtquickcontrols, qtquickcontrols2, qtgraphicaleffects, qtgamepad, qtscxml, qtpurchasing, qtcanvas3d, qtcharts, qtdatavis3d, qtnetworkauth, qtremoteobjects, qtspeech): Update to 5.11.2. Efraim Flashner 2018-10-24gnu: dotherside: Update home-page....* gnu/packages/qt.scm (dotherside)[home-page]: Fix project's home-page. Efraim Flashner