X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Fpatrick_fodella%2Faltermondia.nix;fp=modules%2Fprivate%2Fwebsites%2Fpatrick_fodella%2Faltermondia.nix;h=0000000000000000000000000000000000000000;hp=2a41aa365ee7673aa892a59a8060d1cd6bbf21a5;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0 diff --git a/modules/private/websites/patrick_fodella/altermondia.nix b/modules/private/websites/patrick_fodella/altermondia.nix deleted file mode 100644 index 2a41aa3..0000000 --- a/modules/private/websites/patrick_fodella/altermondia.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ lib, pkgs, config, ... }: -let - cfg = config.myServices.websites.patrick_fodella.altermondia; - varDir = "/var/lib/ftp/patrick_fodella/altermondia"; - apacheUser = config.services.httpd.Prod.user; - apacheGroup = config.services.httpd.Prod.group; -in { - options.myServices.websites.patrick_fodella.altermondia.enable = lib.mkEnableOption "enable Patrick Fodella Altermondia's website"; - - config = lib.mkIf cfg.enable { - services.webstats.sites = [ { name = "altermondia.org"; } ]; - - system.activationScripts.patrick_fodella_altermondia = { - deps = [ "httpd" ]; - text = '' - install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d /var/lib/php/sessions/patrick_fodella_altermondia - ''; - }; - systemd.services.phpfpm-patrick_fodella_altermondia.after = lib.mkAfter [ "mysql.service" ]; - systemd.services.phpfpm-patrick_fodella_altermondia.wants = [ "mysql.service" ]; - services.phpfpm.pools.patrick_fodella_altermondia = { - user = apacheUser; - group = apacheGroup; - settings = { - "listen.owner" = apacheUser; - "listen.group" = apacheGroup; - - "pm" = "ondemand"; - "pm.max_children" = "5"; - "pm.process_idle_timeout" = "60"; - - "php_admin_value[open_basedir]" = "/var/lib/php/sessions/patrick_fodella_altermondia:${varDir}:/tmp"; - "php_admin_value[session.save_path]" = "/var/lib/php/sessions/patrick_fodella_altermondia"; - }; - phpOptions = config.services.phpfpm.phpOptions + '' - disable_functions = "mail" - ''; - phpPackage = pkgs.php72; - }; - services.websites.env.production.modules = [ "proxy_fcgi" ]; - services.websites.env.production.vhostConfs.patrick_fodella_altermondia = { - certName = "patrick_fodella"; - addToCerts = true; - hosts = ["altermondia.org" "www.altermondia.org" ]; - root = varDir; - extraConfig = [ - '' - Use Stats altermondia.org - - RewriteEngine on - RewriteCond "%{HTTP_HOST}" "!^altermondia\.org$" [NC] - RewriteRule ^(.+)$ https://altermondia.org$1 [R=302,L] - - - SetHandler "proxy:unix:${config.services.phpfpm.pools.patrick_fodella_altermondia.socket}|fcgi://localhost" - - - - AllowOverride None - Require all denied - - - DirectoryIndex index.php index.htm index.html - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride all - Require all granted - - '' - ]; - }; - }; -} -