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

25 lines
492 B
Nix

{ NginxSiteConfig
}:
{ siteConfigDir
, runtimeDirectory
, name
, port
, siteName
, siteRoot
, phpFpmSiteSocket ? ""
}:
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;
};
type = "fileset";
}