1
0
Fork 0
selfhostblocks/caddy/mksiteconfig.nix

25 lines
443 B
Nix
Raw Normal View History

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