This commit is contained in:
pazpi 2026-02-15 23:20:36 +01:00
parent e641c5b9b4
commit 256689e389
No known key found for this signature in database
12 changed files with 54 additions and 38 deletions

View file

@ -16,10 +16,14 @@ let
sha256 = "sha256-kL7tVHXZunqGFztbVx850QQ1U5h5wY1ltIONWXwe7QQ=";
};
phpPackage = pkgs.php.withExtensions ({ enabled, all }: enabled ++ [
all.curl
all.dom
]);
phpPackage = pkgs.php.withExtensions (
{ enabled, all }:
enabled
++ [
all.curl
all.dom
]
);
in
{
@ -51,7 +55,13 @@ in
};
poolSettings = lib.mkOption {
type = with lib.types; attrsOf (oneOf [ str int bool ]);
type =
with lib.types;
attrsOf (oneOf [
str
int
bool
]);
default = {
"pm" = "dynamic";
"pm.max_children" = 8;
@ -133,11 +143,13 @@ in
user = cfg.user;
group = cfg.group;
phpPackage = phpPackage;
settings = lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group;
"chdir" = cfg.dataDir;
} // cfg.poolSettings;
settings =
lib.mapAttrs (name: lib.mkDefault) {
"listen.owner" = config.services.caddy.user;
"listen.group" = config.services.caddy.group;
"chdir" = cfg.dataDir;
}
// cfg.poolSettings;
};
# Caddy configuration for serving PHP
@ -169,4 +181,3 @@ in
})
];
}