Compare commits

...

3 Commits

Author SHA1 Message Date
h7x4
9c142fd56f kommode/gitea: remove deprecated config options 2026-05-11 16:00:51 +09:00
Øystein Tveit
b98e8679e6 temmie/userweb: set same phpOptions for env and apache 2026-05-11 14:54:56 +09:00
h7x4
ea092ec0b3 temmie/userweb: pass userdir user to sendmail through custom envvar 2026-05-11 14:26:47 +09:00
2 changed files with 12 additions and 10 deletions

View File

@@ -134,9 +134,6 @@ in {
ALLOW_FORK_INTO_SAME_OWNER = true;
};
picture = {
DISABLE_GRAVATAR = true;
ENABLE_FEDERATED_AVATAR = false;
AVATAR_MAX_FILE_SIZE = 1024 * 1024 * 5;
# NOTE: go any bigger than this, and gitea will freeze your gif >:(
AVATAR_MAX_ORIGIN_SIZE = 1024 * 1024 * 2;

View File

@@ -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; [
@@ -70,9 +73,9 @@ let
text = ''
args=("$@")
if [[ "''${PWD:-}" =~ ^/home/pvv/[^/]+/([^/]+) ]] && [[ "''${BASH_REMATCH[1]}" != "pvv" ]]; then
if [[ -z "$USERDIR_USER" ]] && [[ "$USERDIR_USER" != "pvv" ]]; then
# Prepend -fusername to the argument list, so bounces go to the user
args=("-f''${BASH_REMATCH[1]}" "''${args[@]}")
args=("-f$USERDIR_USER" "''${args[@]}")
fi
exec '${lib.getExe pkgs.system-sendmail}' "''${args[@]}"
@@ -173,6 +176,7 @@ in
enablePHP = true;
phpPackage = phpEnv;
inherit phpOptions;
enablePerl = true;
@@ -209,6 +213,7 @@ in
UserDir disabled root
AddHandler cgi-script .cgi
DirectoryIndex index.html index.html.var index.php index.php3 index.cgi index.phtml index.shtml meg.html
SetEnvIf Request_URI "^/~([^/]+)" USERDIR_USER=$1
<Directory "/home/pvv/?/*/web-docs">
Options MultiViews Indexes SymLinksIfOwnerMatch ExecCGI IncludesNoExec