2020-02-17 17:00:59 +04:00
|
|
|
{ pkgs, config, lib, ... }: {
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
appendHttpConfig = "charset utf-8;";
|
|
|
|
virtualHosts = let
|
|
|
|
default = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
"balsoft.ru" = {
|
2020-03-10 02:12:44 +04:00
|
|
|
locations."/" = {
|
|
|
|
root = "/var/lib/balsoft.ru";
|
|
|
|
index = "index.txt";
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
};
|
2020-03-26 14:05:12 +04:00
|
|
|
"code.balsoft.ru" = {
|
|
|
|
locations."/" = { proxyPass = "http://localhost:6000"; };
|
2020-03-10 01:37:59 +04:00
|
|
|
} // default;
|
2020-02-17 17:00:59 +04:00
|
|
|
"cache.balsoft.ru" = {
|
|
|
|
locations."/" = { proxyPass = "http://localhost:5000"; };
|
|
|
|
} // default;
|
|
|
|
"matrix.balsoft.ru" = {
|
|
|
|
locations."/" = { proxyPass = "https://localhost:13748"; };
|
|
|
|
} // default;
|
|
|
|
"share.balsoft.ru" = {
|
|
|
|
locations."/" = { root = "/var/lib/share"; };
|
|
|
|
} // default;
|
|
|
|
};
|
|
|
|
};
|
2020-04-25 04:41:29 +04:00
|
|
|
security.acme = {
|
|
|
|
email = "balsoft@balsoft.ru";
|
|
|
|
acceptTerms = true;
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|