projects/guix·blob python-team · refs

47 lines · 2.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2023 Ludovic Courtès <[email protected]>
3;;; Copyright © 2025 Zacchaeus <[email protected]>
4;;;
5;;; This file is part of GNU Guix.
6;;;
7;;; GNU Guix is free software; you can redistribute it and/or modify it
8;;; under the terms of the GNU General Public License as published by
9;;; the Free Software Foundation; either version 3 of the License, or (at
10;;; your option) any later version.
11;;;
12;;; GNU Guix is distributed in the hope that it will be useful, but
13;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15;;; GNU General Public License for more details.
16;;;
17;;; You should have received a copy of the GNU General Public License
18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20(define-module (gnu home services syncthing)
21 #:use-module (gnu services)
22 #:use-module (gnu home services)
23 #:use-module (gnu services syncthing)
24 ;; For the 'home-shepherd-service-type' mapping.
25 #:use-module (gnu home services shepherd)
26 #:export (home-syncthing-service-type)
27 #:re-export (syncthing-configuration
28 syncthing-configuration?
29 syncthing-config-file
30 syncthing-config-file?
31 syncthing-device
32 syncthing-device?
33 syncthing-folder
34 syncthing-folder?
35 syncthing-folder-device
36 syncthing-folder-device?))
37
38(define home-syncthing-service-type
39 (service-type
40 (inherit (system->home-service-type syncthing-service-type))
41 ;; system->home-service-type does not convert special-files-service-type to
42 ;; home-files-service-type, so redefine extensios
43 (extensions (list (service-extension home-files-service-type
44 syncthing-files-service)
45 (service-extension home-shepherd-service-type
46 syncthing-shepherd-service)))
47 (default-value (for-home (syncthing-configuration)))))