2023-11-30 18:26:00 -07:00
|
|
|
(define-module (machines ldap)
|
|
|
|
#:use-module (gnu system)
|
|
|
|
#:use-module (guix gexp)
|
|
|
|
#:use-module (system base-system)
|
|
|
|
#:use-module (gnu packages slapd)
|
|
|
|
#:use-module (gnu services)
|
|
|
|
#:use-module (gnu services certbot)
|
|
|
|
#:use-module (gnu services slapd)
|
|
|
|
|
|
|
|
#:export (ldap.metznet.ca))
|
|
|
|
|
|
|
|
(define-public ldap.metznet.ca
|
|
|
|
(operating-system
|
|
|
|
(inherit %metznet-base-server-system)
|
|
|
|
(host-name "ldap.guix.metznet.ca")
|
|
|
|
(services
|
|
|
|
(append (list (service certbot-service-type
|
|
|
|
(certbot-configuration (email "admin@metznet.ca")
|
|
|
|
(certificates (list (certificate-configuration
|
|
|
|
(domains '
|
|
|
|
("ldap.guix.metznet.ca")))))))
|
|
|
|
(service slapd-service-type
|
|
|
|
(slapd-configuration (uris
|
|
|
|
"ldap:// ldapi:// ldaps:// ldapis://")
|
2023-12-01 01:27:39 -07:00
|
|
|
(backups (let ((slapd-seeds (getenv
|
|
|
|
"SLAPD_SEEDS")))
|
|
|
|
(if slapd-seeds
|
|
|
|
(map (lambda (ldif)
|
|
|
|
(local-file
|
|
|
|
ldif))
|
|
|
|
(string-split
|
|
|
|
slapd-seeds
|
|
|
|
#\:))
|
|
|
|
'()))))))
|
2023-11-30 18:26:00 -07:00
|
|
|
%metznet-server-services))))
|