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
|
|
|
};
|
|
|
|
};
|
2022-02-28 23:25:34 +04:00
|
|
|
security.acme.defaults.email = "balsoft@balsoft.ru";
|
|
|
|
security.acme.acceptTerms = true;
|
2020-02-17 17:00:59 +04:00
|
|
|
}
|