From b98e8679e6f491a8bae9a3b64c0beac08446cf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98ystein=20Tveit?= Date: Mon, 11 May 2026 07:54:09 +0200 Subject: [PATCH] temmie/userweb: set same phpOptions for env and apache --- hosts/temmie/services/userweb/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hosts/temmie/services/userweb/default.nix b/hosts/temmie/services/userweb/default.nix index 57f5712..edf98dd 100644 --- a/hosts/temmie/services/userweb/default.nix +++ b/hosts/temmie/services/userweb/default.nix @@ -4,6 +4,13 @@ let homeLetters = [ "a" "b" "c" "d" "h" "i" "j" "k" "l" "m" "z" ]; + phpOptions = lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "${k} = ${v}"){ + display_errors = "Off"; + display_startup_errors = "Off"; + post_max_size = "40M"; + upload_max_filesize = "40M"; + }); + # https://nixos.org/manual/nixpkgs/stable/#ssec-php-user-guide-installing-with-extensions phpEnv = pkgs.php.buildEnv { extensions = { all, ... }: with all; [ @@ -29,11 +36,7 @@ let pdo_sqlite ]; - extraConfig = '' - display_errors=0 - post_max_size = 40M - upload_max_filesize = 40M - ''; + extraConfig = phpOptions; }; perlEnv = pkgs.perl.withPackages (ps: with ps; [ @@ -173,6 +176,7 @@ in enablePHP = true; phpPackage = phpEnv; + inherit phpOptions; enablePerl = true;