1
0
Fork 0
selfhostblocks/nginx/mksiteconfig.nix

29 lines
531 B
Nix
Raw Normal View History

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