;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2019 Robert Vollmert <rob@vllmrt.net>
;;;
;;; This file is part of GNU Guix.
;;;
(define %default-postgres-hba
(plain-file "pg_hba.conf"
"
-local all all trust
-host all all 127.0.0.1/32 trust
-host all all ::1/128 trust"))
+local all all peer
+host all all 127.0.0.1/32 md5
+host all all ::1/128 md5"))
(define %default-postgres-ident
(plain-file "pg_ident.conf"
mysql-configuration make-mysql-configuration
mysql-configuration?
(mysql mysql-configuration-mysql (default mariadb))
- (port mysql-configuration-port (default 3306)))
+ (port mysql-configuration-port (default 3306))
+ (extra-content mysql-configuration-extra-content (default "")))
(define %mysql-accounts
(list (user-group
(define mysql-configuration-file
(match-lambda
- (($ <mysql-configuration> mysql port)
+ (($ <mysql-configuration> mysql port extra-content)
(mixed-text-file "my.cnf" "[mysqld]
datadir=/var/lib/mysql
socket=/run/mysqld/mysqld.sock
port=" (number->string port) "
+" extra-content "
"))))
(define (%mysql-activation config)
(for-each
(lambda (sql)
(call-with-input-file
- (string-append #$mysql "/share/mysql/" sql)
+ (string-append #$mysql:lib "/share/mysql/" sql)
(lambda (in) (dump-port in p))))
'("mysql_system_tables.sql"
"mysql_performance_tables.sql"