gnu.scm 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2015 Joshua S. Grant <jgrant@parenthetical.io>
  4. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  5. ;;;
  6. ;;; This file is part of GNU Guix.
  7. ;;;
  8. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  9. ;;; under the terms of the GNU General Public License as published by
  10. ;;; the Free Software Foundation; either version 3 of the License, or (at
  11. ;;; your option) any later version.
  12. ;;;
  13. ;;; GNU Guix is distributed in the hope that it will be useful, but
  14. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  15. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. ;;; GNU General Public License for more details.
  17. ;;;
  18. ;;; You should have received a copy of the GNU General Public License
  19. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. (define-module (gnu)
  21. #:export (use-package-modules
  22. use-service-modules
  23. use-system-modules))
  24. ;;; Commentary:
  25. ;;;
  26. ;;; This composite module re-exports core parts the (gnu …) public modules.
  27. ;;;
  28. ;;; Code:
  29. (eval-when (eval load compile)
  30. (begin
  31. (define %public-modules
  32. '((gnu system)
  33. (gnu system mapped-devices)
  34. (gnu system file-systems)
  35. (gnu bootloader)
  36. (gnu bootloader grub)
  37. (gnu system pam)
  38. (gnu system shadow) ; 'user-account'
  39. (gnu system linux-initrd)
  40. (gnu system nss)
  41. (gnu services)
  42. (gnu services base)
  43. (gnu packages)
  44. (gnu packages base)
  45. (guix gexp))) ; so gexps can be used
  46. (for-each (let ((i (module-public-interface (current-module))))
  47. (lambda (m)
  48. (module-use! i (resolve-interface m))))
  49. %public-modules)))
  50. (define-syntax-rule (use-package-modules module ...)
  51. (use-modules (gnu packages module) ...))
  52. (define-syntax-rule (use-service-modules module ...)
  53. (use-modules (gnu services module) ...))
  54. (define-syntax-rule (use-system-modules module ...)
  55. (use-modules (gnu system module) ...))
  56. ;;; gnu.scm ends here