about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorElis Hirwing <elis@hirwing.se>2019-09-17 07:20:07 +0200
committerGitHub <noreply@github.com>2019-09-17 07:20:07 +0200
commitc45bf10e9f314ffd3ddf089761f2ec905b288878 (patch)
treea75bf2d83af9501685c15228c7ca0ac04feb1ca7 /nixos/modules
parentfbd23c6f1af0cf9539d1a56af939769b0f7aab91 (diff)
parent7491f85e4faa1be03572f25787e2577bd4ac5962 (diff)
downloadnixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar.gz
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar.bz2
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar.lz
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar.xz
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.tar.zst
nixlib-c45bf10e9f314ffd3ddf089761f2ec905b288878.zip
Merge pull request #68891 from aanderse/moodle
nixos/moodle: add extraConfig option
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/web-apps/moodle.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/services/web-apps/moodle.nix b/nixos/modules/services/web-apps/moodle.nix
index 7f71b86a6fe6..211bc17ee192 100644
--- a/nixos/modules/services/web-apps/moodle.nix
+++ b/nixos/modules/services/web-apps/moodle.nix
@@ -45,6 +45,8 @@ let
   $CFG->aspellpath = '${pkgs.aspell}/bin/aspell';
   $CFG->pathtodot = '${pkgs.graphviz}/bin/dot';
 
+  ${cfg.extraConfig}
+
   require_once('${cfg.package}/share/moodle/lib/setup.php');
 
   // There is no php closing tag in this file,
@@ -172,6 +174,19 @@ in
         for details on configuration directives.
       '';
     };
+
+    extraConfig = mkOption {
+      type = types.lines;
+      default = "";
+      description = ''
+        Any additional text to be appended to the config.php
+        configuration file. This is a PHP script. For configuration
+        details, see <link xlink:href="https://docs.moodle.org/37/en/Configuration_file"/>.
+      '';
+      example = ''
+        $CFG->disableupdatenotifications = true;
+      '';
+    };
   };
 
   # implementation