From b8c4e18d8e1c6552cb6190ce3bce288533a94329 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Wed, 24 Mar 2021 22:34:12 +0100 Subject: [PATCH] limesurvey: use mariadb instead of postgres this should allow us to more easily migrate from our current limesurvey instance on libocedrus. --- services/limesurvey.nix | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/services/limesurvey.nix b/services/limesurvey.nix index 75d5e20..861b897 100644 --- a/services/limesurvey.nix +++ b/services/limesurvey.nix @@ -19,9 +19,10 @@ name = "LimeSurvey"; components = { db = { - connectionString = "pgsql:dbname=limesurvey;host=localhost;port=5432;user=limesurvey"; + connectionString = "mysql:host=localhost;port=3306;dbname=limesurvey"; username = "limesurvey"; tablePrefix = "limesurvey_"; + charset = "utf8mb4"; }; assetManager.basePath = "/var/lib/limesurvey/tmp/assets"; urlManager = { @@ -48,20 +49,33 @@ }; - services.postgresql = { - enable = true; + # services.postgresql = { + # enable = true; + # ensureDatabases = [ "limesurvey" ]; + # ensureUsers = [ { + # name = "limesurvey"; + # ensurePermissions = { "DATABASE limesurvey" = "ALL PRIVILEGES"; }; + # } ]; + + # authentication = lib.mkForce '' + # # Generated file; do not edit! + # local all all trust + # host limesurvey limesurvey ::1/128 trust + # ''; + # }; + # + + services.mysql = { + package = pkgs.mariadb; + ensureDatabases = [ "limesurvey" ]; ensureUsers = [ { name = "limesurvey"; ensurePermissions = { "DATABASE limesurvey" = "ALL PRIVILEGES"; }; } ]; - - authentication = lib.mkForce '' - # Generated file; do not edit! - local all all trust - host limesurvey limesurvey ::1/128 trust - ''; }; + + networking.firewall.allowedTCPPorts = [ 80 ]; }; };