};
customLog = {
extraConfig = ''
- LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedVhost
+ LogFormat "%{Host}i:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combinedVhost
'';
};
};
makeExtraConfig = (builtins.filter (x: x != null) (lib.attrsets.mapAttrsToList (n: v: v.extraConfig or null) apacheConfig));
in
{
- options.myServices.websites.webappDirs = lib.mkOption {
- type = lib.types.attrsOf lib.types.path;
- description = ''
- Webapp paths to create in /run/current-system/webapps
- '';
- default = {};
+ options.myServices.websites = {
+ enable = lib.mkEnableOption "enable websites";
+
+ webappDirs = lib.mkOption {
+ type = lib.types.attrsOf lib.types.path;
+ description = ''
+ Webapp paths to create in /run/current-system/webapps
+ '';
+ default = {};
+ };
};
- config = {
+ config = lib.mkIf config.myServices.websites.enable {
+ services.duplyBackup.profiles.php = {
+ rootDir = "/var/lib/php";
+ };
users.users.wwwrun.extraGroups = [ "keys" ];
networking.firewall.allowedTCPPorts = [ 80 443 ];
'';
};
- services.websites.production = {
+ services.filesWatcher.httpdProd.paths = [ "/var/secrets/apache-ldap" ];
+ services.filesWatcher.httpdInte.paths = [ "/var/secrets/apache-ldap" ];
+ services.filesWatcher.httpdTools.paths = [ "/var/secrets/apache-ldap" ];
+
+ services.websites.env.production = {
enable = true;
adminAddr = "httpd@immae.eu";
httpdName = "Prod";
};
};
- services.websites.integration = {
+ services.websites.env.integration = {
enable = true;
adminAddr = "httpd@immae.eu";
httpdName = "Inte";
};
};
- services.websites.tools = {
+ services.websites.env.tools = {
enable = true;
adminAddr = "httpd@immae.eu";
httpdName = "Tools";
nassime.production.enable = true;
naturaloutil.production.enable = true;
+ telioTortay.production.enable = true;
papa.surveillance.enable = true;
tools.mediagoblin.enable = true;
tools.peertube.enable = true;
tools.tools.enable = true;
+ tools.email.enable = true;
};
};
}