2021-03-18 15:35:19 +00:00
|
|
|
{config, pkgs, lib, ...}:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
containers.limesurvey = {
|
|
|
|
autoStart = true;
|
|
|
|
privateNetwork = true;
|
|
|
|
hostAddress = "192.168.100.40";
|
|
|
|
localAddress = "192.168.100.41";
|
|
|
|
|
|
|
|
config = {config, pkgs, lib, ...}: {
|
|
|
|
imports = [ ./../modules/limesurvey.nix ];
|
|
|
|
|
|
|
|
services.limesurvey-patched = {
|
|
|
|
enable = true;
|
|
|
|
domain = "localhost";
|
|
|
|
|
|
|
|
config = {
|
|
|
|
name = "LimeSurvey";
|
|
|
|
components = {
|
|
|
|
db = {
|
2021-03-24 21:34:12 +00:00
|
|
|
connectionString = "mysql:host=localhost;port=3306;dbname=limesurvey";
|
2021-03-18 15:35:19 +00:00
|
|
|
username = "limesurvey";
|
2021-03-25 13:18:59 +00:00
|
|
|
password = "";
|
2021-03-18 15:35:19 +00:00
|
|
|
tablePrefix = "limesurvey_";
|
2021-03-24 21:34:12 +00:00
|
|
|
charset = "utf8mb4";
|
2021-03-18 15:35:19 +00:00
|
|
|
};
|
|
|
|
assetManager.basePath = "/var/lib/limesurvey/tmp/assets";
|
|
|
|
urlManager = {
|
|
|
|
urlFormat = "path";
|
|
|
|
showScriptName = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = {
|
|
|
|
siteadminemail = "info@infra4future.de";
|
|
|
|
defaultlang = "de";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
package = pkgs.limesurvey.overrideAttrs (old: rec {
|
|
|
|
version = "4.4.12+210308";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "LimeSurvey";
|
|
|
|
repo = "LimeSurvey";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0kjya8if751mh35symzas186ya27nq62adzp2j58agd5ssrb2a8f";
|
|
|
|
};
|
|
|
|
meta.knownVulnerabilities = [];
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2021-03-24 21:34:12 +00:00
|
|
|
services.mysql = {
|
2021-03-25 13:18:59 +00:00
|
|
|
enable = true;
|
2021-03-24 21:34:12 +00:00
|
|
|
package = pkgs.mariadb;
|
|
|
|
|
2021-03-18 15:35:19 +00:00
|
|
|
ensureDatabases = [ "limesurvey" ];
|
|
|
|
ensureUsers = [ {
|
|
|
|
name = "limesurvey";
|
2021-03-25 13:18:59 +00:00
|
|
|
ensurePermissions = { "limesurvey.*" = "ALL PRIVILEGES"; };
|
2021-03-18 15:35:19 +00:00
|
|
|
} ];
|
|
|
|
};
|
2021-03-24 21:34:12 +00:00
|
|
|
|
|
|
|
|
2021-03-18 15:35:19 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-03-24 23:29:06 +00:00
|
|
|
services.nginx.virtualHosts."survey2.infra4future.de" = {
|
2021-03-18 15:35:19 +00:00
|
|
|
locations."/".proxyPass = "http://${config.containers.limesurvey.localAddress}";
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
}
|