Merge pull request #222149 from wegank/limesurvey-bump

limesurvey: 3.27.33+220125 -> 5.6.9+230306

Changed files
+33 -8
nixos
modules
services
web-apps
pkgs
servers
limesurvey
+31 -2
nixos/modules/services/web-apps/limesurvey.nix
···
options.services.limesurvey = {
enable = mkEnableOption (lib.mdDoc "Limesurvey web application");
+
encryptionKey = mkOption {
+
type = types.str;
+
default = "E17687FC77CEE247F0E22BB3ECF27FDE8BEC310A892347EC13013ABA11AA7EB5";
+
description = lib.mdDoc ''
+
This is a 32-byte key used to encrypt variables in the database.
+
You _must_ change this from the default value.
+
'';
+
};
+
+
encryptionNonce = mkOption {
+
type = types.str;
+
default = "1ACC8555619929DB91310BE848025A427B0F364A884FFA77";
+
description = lib.mdDoc ''
+
This is a 24-byte nonce used to encrypt variables in the database.
+
You _must_ change this from the default value.
+
'';
+
};
+
database = {
type = mkOption {
type = types.enum [ "mysql" "pgsql" "odbc" "mssql" ];
example = "pgsql";
default = "mysql";
description = lib.mdDoc "Database engine to use.";
+
};
+
+
dbEngine = mkOption {
+
type = types.enum [ "MyISAM" "InnoDB" ];
+
default = "InnoDB";
+
description = lib.mdDoc "Database storage engine to use.";
};
host = mkOption {
···
config = {
tempdir = "${stateDir}/tmp";
uploaddir = "${stateDir}/upload";
+
encryptionnonce = cfg.encryptionNonce;
+
encryptionsecretboxkey = cfg.encryptionKey;
force_ssl = mkIf (cfg.virtualHost.addSSL || cfg.virtualHost.forceSSL || cfg.virtualHost.onlySSL) "on";
config.defaultlang = "en";
};
···
services.phpfpm.pools.limesurvey = {
inherit user group;
+
phpPackage = pkgs.php80;
+
phpEnv.DBENGINE = "${cfg.database.dbEngine}";
phpEnv.LIMESURVEY_CONFIG = "${limesurveyConfig}";
settings = {
"listen.owner" = config.services.httpd.user;
···
wantedBy = [ "multi-user.target" ];
before = [ "phpfpm-limesurvey.service" ];
after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service";
+
environment.DBENGINE = "${cfg.database.dbEngine}";
environment.LIMESURVEY_CONFIG = limesurveyConfig;
script = ''
# update or install the database as required
-
${pkgs.php}/bin/php ${pkg}/share/limesurvey/application/commands/console.php updatedb || \
-
${pkgs.php}/bin/php ${pkg}/share/limesurvey/application/commands/console.php install admin password admin admin@example.com verbose
+
${pkgs.php80}/bin/php ${pkg}/share/limesurvey/application/commands/console.php updatedb || \
+
${pkgs.php80}/bin/php ${pkg}/share/limesurvey/application/commands/console.php install admin password admin admin@example.com verbose
'';
serviceConfig = {
User = user;
+2 -6
pkgs/servers/limesurvey/default.nix
···
stdenv.mkDerivation rec {
pname = "limesurvey";
-
version = "3.27.33+220125";
+
version = "5.6.9+230306";
src = fetchFromGitHub {
owner = "LimeSurvey";
repo = "LimeSurvey";
rev = version;
-
sha256 = "sha256-iwTsn+glh8fwt1IaH9iDKDhEAnx1s1zvv1dmsdzUk8g=";
+
hash = "sha256-FBcpP9Zb4flr1AZlocRW8xx9UCXJAU9aaGXcWQE6iWc=";
};
phpConfig = writeText "config.php" ''
···
homepage = "https://www.limesurvey.org";
maintainers = with maintainers; [offline];
platforms = with platforms; unix;
-
knownVulnerabilities = [
-
"CVE-2022-48008"
-
"CVE-2022-48010"
-
];
};
}