48 lines
1.3 KiB
Nix
Raw Normal View History

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