service 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © `(nth 5 (decode-time))` `user-full-name` <`user-mail-address`>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu services `(file-name-base (buffer-name))`)
  19. #:use-module (gnu services base)
  20. #:use-module (gnu services configuration)
  21. #:use-module (gnu services shepherd)
  22. #:use-module (gnu services web)
  23. #:use-module (gnu services)
  24. #:use-module (gnu system shadow)
  25. #:use-module (guix gexp)
  26. #:use-module (guix packages)
  27. #:use-module (guix records)
  28. #:use-module (guix store)
  29. #:export (`(file-name-base (buffer-name))`-configuration
  30. `(file-name-base (buffer-name))`-service-type))
  31. ;;; Commentary:
  32. ;;;
  33. ;;; This module provides a service definition for the SERVICE_NAME
  34. ;;; SERVICE_DESCRTIPTION
  35. ;;;
  36. ;;; Code:
  37. (define-record-type* <`(file-name-base (buffer-name))`-configuration>
  38. `(file-name-base (buffer-name))`-configuration make-`(file-name-base (buffer-name))`-configuration
  39. `(file-name-base (buffer-name))`-configuration?
  40. (uid `(file-name-base (buffer-name))`-configuration-uid ;string
  41. (default "`(file-name-base (buffer-name))`"))
  42. (gid `(file-name-base (buffer-name))`-configuration-gid ;string
  43. (default "`(file-name-base (buffer-name))`")))
  44. (define (`(file-name-base (buffer-name))`-activation config)
  45. "Return the activation gexp for CONFIG."
  46. #~(begin
  47. (use-modules (guix build utils))
  48. ))
  49. (define `(file-name-base (buffer-name))`-service-type
  50. (service-type
  51. (name '`(file-name-base (buffer-name))`)
  52. (extensions
  53. (list (service-extension activation-service-type
  54. `(file-name-base (buffer-name))`-activation)))
  55. (default-value (`(file-name-base (buffer-name))`-configuration))
  56. (description
  57. "Run the `(file-name-base (buffer-name))`.")))
  58. ;;; `(buffer-name)` ends here