metznet-channel/machines/ldap.metznet.ca.scm

42 lines
1.6 KiB
Scheme

2023-11-27 23:12:23 -07:00
(define-module (machines base-desktop)
#:use-module (system base-system)
#:use-module (guix gexp)
#:use-module (gnu)
#:use-module (gnu services configuration)
#:use-module (gnu packages openldap)
#:use-module (gnu packages admin))
(define-configuration/no-serialization slapd-configuration
(openldap (file-like openldap)
"openldap package to use")
(slapd-uris (list-of-strings (list
"ldap://"
"ldapi://"))
"slapd uris to accept connections to"))
(define (slapd-accounts config)
(list (user-group
(name "slapd")
(system? #t))
(user-account
(name "slapd")
(group "slapd")
(system? #t)
(comment "openldap service account")
(home-directory "/var/lib/slapd")
(shell #~(string-append #$shadow "/sbin/nologin")))))
(define slapd-service-type
(service-type (name 'slapd)
(description "openldap slapd service")
(extensions (list (service-extension account-service-type
slapd-accounts)))
(default-value (slapd-configuration))))
(operating-system
(inherit %metznet-base-server-system)
(host-name "ldap.metznet.ca")
(packages %metznet-server-packages)
(services
(append (list (service slapd-service-type)) %metznet-server-services)))