2022-09-29 08:37:24 +02:00
|
|
|
{ NginxSiteConfig
|
|
|
|
}:
|
|
|
|
{ siteConfigDir
|
|
|
|
, runtimeDirectory
|
|
|
|
, name
|
|
|
|
, port
|
|
|
|
, siteName
|
|
|
|
, siteRoot
|
|
|
|
, phpFpmSiteSocket ? ""
|
2022-10-04 09:08:51 +02:00
|
|
|
, dependsOn ? {}
|
2022-09-29 08:37:24 +02:00
|
|
|
}:
|
|
|
|
rec {
|
|
|
|
inherit name siteConfigDir;
|
|
|
|
siteConfigFile = "${siteName}.config";
|
|
|
|
nginxSocket = "${runtimeDirectory}/${siteName}.sock";
|
|
|
|
pkg = NginxSiteConfig rec {
|
|
|
|
inherit siteConfigDir siteConfigFile;
|
|
|
|
inherit phpFpmSiteSocket;
|
|
|
|
|
|
|
|
portBinding = port;
|
|
|
|
bindService = siteName;
|
|
|
|
siteSocket = nginxSocket;
|
|
|
|
serviceRoot = siteRoot;
|
|
|
|
};
|
2022-10-04 09:08:51 +02:00
|
|
|
|
|
|
|
inherit dependsOn;
|
2022-09-29 08:37:24 +02:00
|
|
|
type = "fileset";
|
|
|
|
}
|