nixpkgs/systems/hikari/web-development/lib/create-static.nix

31 lines
710 B
Nix
Raw Normal View History

{
config
, domain
, relativeDocumentRoot
}:
let
documentRoot = "${config.custom.web-development.rootPath}/${relativeDocumentRoot}";
in {
services = {
2023-02-07 08:57:10 +01:00
httpd.virtualHosts.${domain} = {
forceSSL = true;
sslServerCert = "${config.custom.web-development.certFolder}${domain}.pem";
sslServerKey = "${config.custom.web-development.certFolder}${domain}-key.pem";
inherit documentRoot;
extraConfig = ''
<Directory ${documentRoot}>
AllowOverride All
Require all granted
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
DirectoryIndex index.html Index.html
</Directory>
'';
};
2023-02-07 08:57:10 +01:00
};
}