X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Femilia%2Fmoodle.nix;fp=modules%2Fprivate%2Fwebsites%2Femilia%2Fmoodle.nix;h=0000000000000000000000000000000000000000;hp=779c46004fd6abd4d1e6b5316cc3ab182036da84;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/modules/private/websites/emilia/moodle.nix b/modules/private/websites/emilia/moodle.nix deleted file mode 100644 index 779c460..0000000 --- a/modules/private/websites/emilia/moodle.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.emilia.moodle; - env = config.myEnv.websites.emilia; - varDir = "/var/lib/emilia_moodle"; - siteDir = ./moodle; - # php_admin_value[upload_max_filesize] = 50000000 - # php_admin_value[post_max_size] = 50000000 - configFile = '' - dbtype = 'pgsql'; - $CFG->dblibrary = 'native'; - $CFG->dbhost = '${env.postgresql.host}'; - $CFG->dbname = '${env.postgresql.database}'; - $CFG->dbuser = '${env.postgresql.user}'; - $CFG->dbpass = '${env.postgresql.password}'; - $CFG->prefix = 'mdl_'; - $CFG->dboptions = array ( - 'dbpersist' => 0, - 'dbport' => '${env.postgreesql.port}', - 'dbsocket' => '${env.postgresql.password}', - ); - - $CFG->wwwroot = 'https://www.saison-photo.org'; - $CFG->dataroot = '${varDir}'; - $CFG->admin = 'admin'; - - $CFG->directorypermissions = 02777; - - require_once(__DIR__ . '/lib/setup.php'); - - // There is no php closing tag in this file, - // it is intentional because it prevents trailing whitespace problems! - ''; - apacheUser = config.services.httpd.Prod.user; - apacheGroup = config.services.httpd.Prod.group; -in { - options.myServices.websites.emilia.moodle.enable = lib.mkEnableOption "enable Emilia's website"; - - config = lib.mkIf cfg.enable { - system.activationScripts.emilia_moodle = '' - install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} - ''; - services.websites.env.production.vhostConfs.emilia_moodle = { - certName = "emilia"; - certMainHost = "saison-photo.org"; - hosts = [ "saison-photo.org" "www.saison-photo.org" ]; - root = siteDir; - extraConfig = [ - '' - - DirectoryIndex pause.html - Options Indexes FollowSymLinks MultiViews Includes - Require all granted - - '' - ]; - }; - }; -}