X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fdefault.nix;h=119d62e565251a45687bad76cc06d708a2c10e55;hb=8415083eb6acc343dfa404dbbc12fa0171a48a20;hp=8b02977c98ff8111e300ae446463be7cead4b37b;hpb=4288c2f2431fb782b0d512b1b3749187f2374b6a;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index 8b02977..119d62e 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -56,7 +56,7 @@ let }; 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 ''; }; }; @@ -64,15 +64,22 @@ let 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.backup.profiles.php = { + rootDir = "/var/lib/php"; + }; users.users.wwwrun.extraGroups = [ "keys" ]; networking.firewall.allowedTCPPorts = [ 80 443 ]; @@ -138,7 +145,11 @@ in ''; }; - 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"; @@ -155,7 +166,7 @@ in }; }; - services.websites.integration = { + services.websites.env.integration = { enable = true; adminAddr = "httpd@immae.eu"; httpdName = "Inte"; @@ -172,7 +183,7 @@ in }; }; - services.websites.tools = { + services.websites.env.tools = { enable = true; adminAddr = "httpd@immae.eu"; httpdName = "Tools"; @@ -244,6 +255,7 @@ in nassime.production.enable = true; naturaloutil.production.enable = true; + telioTortay.production.enable = true; papa.surveillance.enable = true; @@ -260,6 +272,7 @@ in tools.mediagoblin.enable = true; tools.peertube.enable = true; tools.tools.enable = true; + tools.email.enable = true; }; }; }