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