{ pkgs, inputs, ... }: let fortune = pkgs.writeShellScript "cgi" '' echo "Content-type: text/html" echo "" ${pkgs.fortune}/bin/fortune ''; in { services.mysql = { enable = true; package = pkgs.mariadb; }; services.httpd = { enable = true; enablePHP = true; phpPackage = inputs.phps.packages.x86_64-linux.php80; extraConfig = '' ScriptAlias /fortune ${fortune}/bin/fortune ''; virtualHosts."localhost" = { documentRoot = "/var/www"; locations."/".index = "index.html index.php"; }; }; }