2022-09-12 21:21:18 +02:00
|
|
|
{ CaddySiteConfig
|
|
|
|
}:
|
|
|
|
{ CaddyConfig
|
|
|
|
, CaddyService
|
|
|
|
, name
|
|
|
|
, port
|
|
|
|
, siteName
|
|
|
|
, siteRoot
|
2022-09-15 05:46:14 +02:00
|
|
|
, phpFpmSiteSocket ? ""
|
2022-09-12 21:21:18 +02:00
|
|
|
}:
|
2022-09-14 08:47:49 +02:00
|
|
|
rec {
|
2022-09-12 21:21:18 +02:00
|
|
|
inherit name;
|
2022-09-14 08:47:49 +02:00
|
|
|
caddySocket = "${CaddyService.runtimeDirectory}/${siteName}.sock";
|
2022-09-12 21:21:18 +02:00
|
|
|
pkg = CaddySiteConfig rec {
|
|
|
|
inherit (CaddyConfig) siteConfigDir;
|
2022-09-15 05:46:14 +02:00
|
|
|
inherit phpFpmSiteSocket;
|
2022-09-12 21:21:18 +02:00
|
|
|
|
|
|
|
portBinding = port;
|
|
|
|
bindService = siteName;
|
2022-09-14 08:47:49 +02:00
|
|
|
siteSocket = caddySocket;
|
2022-09-12 21:21:18 +02:00
|
|
|
serviceRoot = siteRoot;
|
|
|
|
};
|
|
|
|
type = "fileset";
|
|
|
|
}
|