1
0
Fork 0
selfhostblocks/nginx/mksiteconfig.nix

29 lines
531 B
Nix
Raw Normal View History

2022-09-28 23:37:24 -07:00
{ NginxSiteConfig
}:
{ siteConfigDir
, runtimeDirectory
, name
, port
, siteName
, siteRoot
, phpFpmSiteSocket ? ""
2022-10-04 00:08:51 -07:00
, dependsOn ? {}
2022-09-28 23:37:24 -07:00
}:
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;
};
2022-10-04 00:08:51 -07:00
inherit dependsOn;
2022-09-28 23:37:24 -07:00
type = "fileset";
}