1
0
Fork 0
selfhostblocks/caddy/mksiteconfig.nix
2023-02-19 20:37:52 -08:00

24 lines
443 B
Nix

{ CaddySiteConfig
}:
{ CaddyConfig
, CaddyService
, name
, port
, siteName
, siteRoot
, phpFpmSiteSocket ? ""
}:
rec {
inherit name;
caddySocket = "${CaddyService.runtimeDirectory}/${siteName}.sock";
pkg = CaddySiteConfig rec {
inherit (CaddyConfig) siteConfigDir;
inherit phpFpmSiteSocket;
portBinding = port;
bindService = siteName;
siteSocket = caddySocket;
serviceRoot = siteRoot;
};
type = "fileset";
}