services: postgresql: Add a default-value to the postgresql-service-type.

* gnu/packages/databases.scm (<postgresql-configuration>)
  [config-file,data-directory]: Add default.
  (postgresql-service-type)[default-value]:
  Set to (postgresql-configuration).
This commit is contained in:
Christopher Baines 2018-01-18 22:45:26 +00:00
parent 8b2219d847
commit 1e6b9c6e16
No known key found for this signature in database
GPG Key ID: 5E28A33B0B84F577
1 changed files with 6 additions and 3 deletions

View File

@ -77,8 +77,10 @@
(default 5432)) (default 5432))
(locale postgresql-configuration-locale (locale postgresql-configuration-locale
(default "en_US.utf8")) (default "en_US.utf8"))
(config-file postgresql-configuration-file) (config-file postgresql-configuration-file
(data-directory postgresql-configuration-data-directory)) (default %default-postgres-config))
(data-directory postgresql-configuration-data-directory
(default "/var/lib/postgresql/data")))
(define %default-postgres-hba (define %default-postgres-hba
(plain-file "pg_hba.conf" (plain-file "pg_hba.conf"
@ -184,7 +186,8 @@ host all all ::1/128 trust"))
(service-extension activation-service-type (service-extension activation-service-type
postgresql-activation) postgresql-activation)
(service-extension account-service-type (service-extension account-service-type
(const %postgresql-accounts)))))) (const %postgresql-accounts))))
(default-value (postgresql-configuration))))
(define* (postgresql-service #:key (postgresql postgresql) (define* (postgresql-service #:key (postgresql postgresql)
(port 5432) (port 5432)