unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30691] [PATCH] Add database service default values.
@ 2018-03-03 22:14 Christopher Baines
  2018-03-03 22:21 ` [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type Christopher Baines
  2018-03-03 22:50 ` [bug#30691] [PATCH] Add database service default values Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Christopher Baines @ 2018-03-03 22:14 UTC (permalink / raw)
  To: 30691

[-- Attachment #1: Type: text/plain, Size: 337 bytes --]


Christopher Baines (3):
  services: postgresql: Add a default-value to the
    postgresql-service-type.
  services: mysql: Add a default-value to the mysql-service-type.
  services: redis: Add a default-value to the redis-service-type.

 gnu/services/databases.scm | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type.
  2018-03-03 22:14 [bug#30691] [PATCH] Add database service default values Christopher Baines
@ 2018-03-03 22:21 ` Christopher Baines
  2018-03-03 22:21   ` [bug#30691] [PATCH 2/3] services: mysql: Add a default-value to the mysql-service-type Christopher Baines
  2018-03-03 22:21   ` [bug#30691] [PATCH 3/3] services: redis: Add a default-value to the redis-service-type Christopher Baines
  2018-03-03 22:50 ` [bug#30691] [PATCH] Add database service default values Ludovic Courtès
  1 sibling, 2 replies; 6+ messages in thread
From: Christopher Baines @ 2018-03-03 22:21 UTC (permalink / raw)
  To: 30691

* gnu/packages/databases.scm (<postgresql-configuration>)
  [config-file,data-directory]: Add default.
  (postgresql-service-type)[default-value]:
  Set to (postgresql-configuration).
---
 gnu/services/databases.scm | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index b34a67aa9..3db9472ee 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -77,8 +77,10 @@
                   (default 5432))
   (locale         postgresql-configuration-locale
                   (default "en_US.utf8"))
-  (config-file    postgresql-configuration-file)
-  (data-directory postgresql-configuration-data-directory))
+  (config-file    postgresql-configuration-file
+                  (default %default-postgres-config))
+  (data-directory postgresql-configuration-data-directory
+                  (default "/var/lib/postgresql/data")))
 
 (define %default-postgres-hba
   (plain-file "pg_hba.conf"
@@ -184,7 +186,8 @@ host	all	all	::1/128 	trust"))
                        (service-extension activation-service-type
                                           postgresql-activation)
                        (service-extension account-service-type
-                                          (const %postgresql-accounts))))))
+                                          (const %postgresql-accounts))))
+                (default-value (postgresql-configuration))))
 
 (define* (postgresql-service #:key (postgresql postgresql)
                              (port 5432)
-- 
2.16.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#30691] [PATCH 2/3] services: mysql: Add a default-value to the mysql-service-type.
  2018-03-03 22:21 ` [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type Christopher Baines
@ 2018-03-03 22:21   ` Christopher Baines
  2018-03-03 22:21   ` [bug#30691] [PATCH 3/3] services: redis: Add a default-value to the redis-service-type Christopher Baines
  1 sibling, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2018-03-03 22:21 UTC (permalink / raw)
  To: 30691

* gnu/services/databases.scm (mysql-service-type)[default-value]: Set
  to (mysql-configuration).
---
 gnu/services/databases.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 3db9472ee..1d56015b7 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -469,7 +469,8 @@ FLUSH PRIVILEGES;
           (service-extension activation-service-type
                              %mysql-activation)
           (service-extension shepherd-root-service-type
-                             mysql-shepherd-service)))))
+                             mysql-shepherd-service)))
+   (default-value (mysql-configuration))))
 
 (define* (mysql-service #:key (config (mysql-configuration)))
   "Return a service that runs @command{mysqld}, the MySQL or MariaDB
-- 
2.16.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#30691] [PATCH 3/3] services: redis: Add a default-value to the redis-service-type.
  2018-03-03 22:21 ` [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type Christopher Baines
  2018-03-03 22:21   ` [bug#30691] [PATCH 2/3] services: mysql: Add a default-value to the mysql-service-type Christopher Baines
@ 2018-03-03 22:21   ` Christopher Baines
  1 sibling, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2018-03-03 22:21 UTC (permalink / raw)
  To: 30691

* gnu/packages/databases.scm (redis-service-type)[default-value]: Set
  to (redis-configuration).
---
 gnu/services/databases.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/databases.scm b/gnu/services/databases.scm
index 1d56015b7..3ca8f471f 100644
--- a/gnu/services/databases.scm
+++ b/gnu/services/databases.scm
@@ -552,4 +552,5 @@ The optional @var{config} argument specifies the configuration for
                        (service-extension activation-service-type
                                           redis-activation)
                        (service-extension account-service-type
-                                          (const %redis-accounts))))))
+                                          (const %redis-accounts))))
+                (default-value (redis-configuration))))
-- 
2.16.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#30691] [PATCH] Add database service default values.
  2018-03-03 22:14 [bug#30691] [PATCH] Add database service default values Christopher Baines
  2018-03-03 22:21 ` [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type Christopher Baines
@ 2018-03-03 22:50 ` Ludovic Courtès
  2018-03-04  0:12   ` bug#30691: " Christopher Baines
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-03-03 22:50 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 30691

Heya Chris,

Christopher Baines <mail@cbaines.net> skribis:

> Christopher Baines (3):
>   services: postgresql: Add a default-value to the
>     postgresql-service-type.
>   services: mysql: Add a default-value to the mysql-service-type.
>   services: redis: Add a default-value to the redis-service-type.

All LGTM!

I feel that combined with implicit service instantiation it’ll save you
quite a bit of typing.  :-)

Ludo’.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30691: [PATCH] Add database service default values.
  2018-03-03 22:50 ` [bug#30691] [PATCH] Add database service default values Ludovic Courtès
@ 2018-03-04  0:12   ` Christopher Baines
  0 siblings, 0 replies; 6+ messages in thread
From: Christopher Baines @ 2018-03-04  0:12 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 30691-done

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]


Ludovic Courtès <ludo@gnu.org> writes:

> Heya Chris,
>
> Christopher Baines <mail@cbaines.net> skribis:
>
>> Christopher Baines (3):
>>   services: postgresql: Add a default-value to the
>>     postgresql-service-type.
>>   services: mysql: Add a default-value to the mysql-service-type.
>>   services: redis: Add a default-value to the redis-service-type.
>
> All LGTM!
>
> I feel that combined with implicit service instantiation it’ll save you
> quite a bit of typing.  :-)

Great, I've pushed these now :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-04  0:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-03 22:14 [bug#30691] [PATCH] Add database service default values Christopher Baines
2018-03-03 22:21 ` [bug#30691] [PATCH 1/3] services: postgresql: Add a default-value to the postgresql-service-type Christopher Baines
2018-03-03 22:21   ` [bug#30691] [PATCH 2/3] services: mysql: Add a default-value to the mysql-service-type Christopher Baines
2018-03-03 22:21   ` [bug#30691] [PATCH 3/3] services: redis: Add a default-value to the redis-service-type Christopher Baines
2018-03-03 22:50 ` [bug#30691] [PATCH] Add database service default values Ludovic Courtès
2018-03-04  0:12   ` bug#30691: " Christopher Baines

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).