Allow to define projects in one set

Right now it was necessary to make additions to the generated
configuration.
This now changed by adding further options to the new submodules.
That way each project can be defined as a single set and pass additional
configuration down to the modules.

This makes it easier to maintain projects.
This commit is contained in:
Daniel Siepmann 2024-06-24 16:30:48 +02:00
parent 1f2e25abf2
commit 7baf8d5f6e
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 10 additions and 2 deletions

View file

@ -24,6 +24,14 @@ in {
phpPackage = lib.mkOption {
type = package;
};
phpExtraConfig = lib.mkOption {
type = str;
default = "";
};
phpEnv = lib.mkOption {
type = attrsOf str;
default = {};
};
};
});
};
@ -47,7 +55,7 @@ in {
xdebug.var_display_max_depth = 5
xdebug.max_nesting_level = 400
'';
'' + cfg.phpExtraConfig;
};
in {
inherit (config.services.httpd) user group;
@ -68,7 +76,7 @@ in {
# Used via TYPO3 API, expose
IMAGEMAGICK_PATH = lib.makeBinPath [ pkgs.imagemagick ] + "/";
};
} // cfg.phpEnv;
}) cfg;
services.httpd.virtualHosts = builtins.mapAttrs (domainName: cfg: