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-07-28 14:39:11 +04:00
|
|
|
default = true;
|
2020-03-10 02:12:44 +04:00
|
|
|
locations."/" = {
|
|
|
|
root = "/var/lib/balsoft.ru";
|
|
|
|
index = "index.txt";
|
|
|
|
};
|
2020-07-31 16:11:51 +04:00
|
|
|
locations."/.well-known" = {
|
|
|
|
proxyPass = "http://localhost:13748";
|
|
|
|
};
|
2020-07-28 14:02:32 +04:00
|
|
|
locations."/_matrix" = {
|
2020-07-30 00:50:51 +04:00
|
|
|
proxyPass = "http://localhost:13748";
|
2020-07-28 14:02:32 +04:00
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
enableACME = true;
|
2021-03-18 23:37:59 +04:00
|
|
|
forceSSL = true;
|
2020-02-17 17:00:59 +04:00
|
|
|
};
|
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" = {
|
2020-07-31 16:11:51 +04:00
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://localhost:13748";
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
} // default;
|
|
|
|
"share.balsoft.ru" = {
|
|
|
|
locations."/" = { root = "/var/lib/share"; };
|
|
|
|
} // default;
|
2021-03-18 14:03:09 +04:00
|
|
|
"things.balsoft.ru" = {
|
|
|
|
locations."/" = { root = "/nix/var/nix/profiles/per-user/nginx/random-things/www"; };
|
|
|
|
} // default;
|
2020-02-17 17:00:59 +04:00
|
|
|
};
|
|
|
|
};
|
2020-04-25 04:41:29 +04:00
|
|
|
security.acme = {
|
|
|
|
email = "balsoft@balsoft.ru";
|
|
|
|
acceptTerms = true;
|
|
|
|
};
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|