aboutsummaryrefslogtreecommitdiff
path: root/gnu/home/services/upnp.scm
blob: 869c8e0c4a7f286b208be5e03232dffbc9045798 (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
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2025 Sughosha <sughosha@disroot.org>
;;;
;;; 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 home services upnp)
  #:use-module ((gnu build linux-container) #:select (%namespaces))
  #:use-module (gnu services)
  #:use-module (gnu home services)
  ;; For the 'home-shepherd-service-type' mapping.
  #:use-module (gnu home services shepherd)
  #:use-module (gnu services upnp)
  #:use-module (guix records)
  #:export (home-readymedia-service-type)
  #:re-export (readymedia-configuration
               readymedia-configuration?
               readymedia-configuration-readymedia
               readymedia-configuration-port
               readymedia-configuration-cache-directory
               readymedia-configuration-extra-config
               readymedia-configuration-friendly-name
               readymedia-configuration-log-directory
               readymedia-configuration-media-directories
               readymedia-media-directory
               readymedia-media-directory?
               readymedia-media-directory-path
               readymedia-media-directory-types))

(define home-readymedia-service-type
  (service-type
   (inherit (system->home-service-type readymedia-service-type))
   ;; system->home-service-type does not convert special-files-service-type to
   ;; home-files-service-type, so redefine extensios
   (extensions
    (list (service-extension home-shepherd-service-type
                             (compose list readymedia-shepherd-service))
          (service-extension home-activation-service-type
                             readymedia-activation)))
   (default-value
    (for-home
     (readymedia-configuration
       (media-directories '()))))))