1 { lib, pkgs, config, ... }:
3 cfg = config.services.myWebsites.Leila;
4 varDir = "/var/lib/ftp/leila";
6 options.services.myWebsites.Leila = {
8 enable = lib.mkEnableOption "enable Leila's website in production";
12 config = (lib.mkIf cfg.production.enable {
13 security.acme.certs."leila" = config.services.myCertificates.certConfig // {
14 domain = "leila.bouya.org";
16 "chorale.leila.bouya.org" = null;
17 "chorale-vocanta.fr.nf" = null;
18 "www.chorale-vocanta.fr.nf" = null;
22 services.myPhpfpm.poolConfigs.leila = ''
23 listen = /run/phpfpm/leila.sock
31 pm.process_idle_timeout = 60
33 php_admin_value[open_basedir] = "${varDir}:/tmp"
36 services.webstats.sites = [
37 { name = "leila.bouya.org"; }
38 { name = "chorale.leila.bouya.org"; }
41 services.myWebsites.production.modules = [ "proxy_fcgi" ];
42 services.myWebsites.production.vhostConfs.leila_chorale = {
44 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
45 root = "${varDir}/Chorale";
48 Use Stats chorale.leila.bouya.org
49 <Directory ${varDir}/Chorale>
50 DirectoryIndex index.php index.htm index.html
51 Options Indexes FollowSymLinks MultiViews Includes
55 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
58 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
64 services.myWebsites.production.vhostConfs.leila = {
66 hosts = [ "leila.bouya.org" ];
70 Use Stats leila.bouya.org
71 <Directory ${varDir}/Chorale>
72 DirectoryIndex index.htm index.html
73 Options Indexes FollowSymLinks MultiViews Includes
77 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
80 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
84 DirectoryIndex index.htm index.html
85 Options Indexes FollowSymLinks MultiViews Includes