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";
16 config = (lib.mkIf cfg.production.enable {
17 security.acme.certs."leila" = config.services.myCertificates.certConfig // {
18 domain = "leila.bouya.org";
20 "chorale.leila.bouya.org" = null;
21 "chorale-vocanta.fr.nf" = null;
22 "www.chorale-vocanta.fr.nf" = null;
26 services.myPhpfpm.poolConfigs.leila = ''
27 listen = /run/phpfpm/leila.sock
35 pm.process_idle_timeout = 60
37 php_admin_value[open_basedir] = "${varDir}:/tmp"
40 services.myWebsites.commons.stats.enable = true;
41 services.myWebsites.commons.stats.sites = [
42 { name = "leila.bouya.org"; }
43 { name = "chorale.leila.bouya.org"; }
46 services.myWebsites.production.modules = [ "proxy_fcgi" ];
47 services.myWebsites.production.vhostConfs.leila_chorale = {
49 hosts = [ "chorale.leila.bouya.org" "chorale-vocanta.fr.nf" "www.chorale-vocanta.fr.nf" ];
50 root = "${varDir}/Chorale";
53 Use Stats chorale.leila.bouya.org
54 <Directory ${varDir}/Chorale>
55 DirectoryIndex index.php index.htm index.html
56 Options Indexes FollowSymLinks MultiViews Includes
60 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
63 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
69 services.myWebsites.production.vhostConfs.leila = {
71 hosts = [ "leila.bouya.org" ];
75 Use Stats leila.bouya.org
76 <Directory ${varDir}/Chorale>
77 DirectoryIndex index.htm index.html
78 Options Indexes FollowSymLinks MultiViews Includes
82 Require ldap-group cn=chorale.leila.bouya.org,cn=httpd,ou=services,dc=immae,dc=eu
85 SetHandler "proxy:unix:/run/phpfpm/leila.sock|fcgi://localhost"
89 DirectoryIndex index.htm index.html
90 Options Indexes FollowSymLinks MultiViews Includes