-{ env }:
+{ env, config }:
rec {
- keys = [{
- dest = "webapps/tools-dmarc-reports.php";
+ keys."webapps/tools-dmarc-reports.php" = {
user = "wwwrun";
group = "wwwrun";
permissions = "0400";
$anonymous_key = "${env.anonymous_key}";
?>
'';
- }];
+ };
webRoot = ./dmarc_reports;
apache = rec {
user = "wwwrun";
group = "wwwrun";
modules = [ "proxy_fcgi" ];
- webappName = "tools_dmarc_reports";
- root = "/run/current-system/webapps/${webappName}";
+ root = webRoot;
vhostConf = socket: ''
Alias /dmarc-reports "${root}"
<Directory "${root}">
};
phpFpm = rec {
basedir = builtins.concatStringsSep ":"
- [ webRoot "/var/secrets/webapps/tools-dmarc-reports.php" ];
+ [ webRoot config.secrets.fullPaths."webapps/tools-dmarc-reports.php" ];
pool = {
"listen.owner" = apache.user;
"listen.group" = apache.group;
"php_admin_value[open_basedir]" = "${basedir}:/tmp";
};
phpEnv = {
- SECRETS_FILE = "/var/secrets/webapps/tools-dmarc-reports.php";
+ SECRETS_FILE = config.secrets.fullPaths."webapps/tools-dmarc-reports.php";
};
};
}