fix nginx
This commit is contained in:
parent
0885fdbfdd
commit
b48e7ebb13
4 changed files with 24 additions and 25 deletions
|
|
@ -83,6 +83,7 @@
|
||||||
./common.nix
|
./common.nix
|
||||||
./hosts/vps/configuration.nix
|
./hosts/vps/configuration.nix
|
||||||
./hosts/vps/disko-config.nix
|
./hosts/vps/disko-config.nix
|
||||||
|
./services/nginx.nix
|
||||||
./services/blog.nix
|
./services/blog.nix
|
||||||
./services/coturn.nix
|
./services/coturn.nix
|
||||||
./services/wireguard-outer.nix
|
./services/wireguard-outer.nix
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,7 @@
|
||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.nginx = {
|
services.nginx.virtualHosts."ellie.town" = {
|
||||||
enable = true;
|
|
||||||
|
|
||||||
virtualHosts."ellie.town" = {
|
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
root = "/var/www/blog";
|
root = "/var/www/blog";
|
||||||
|
|
@ -13,10 +10,4 @@
|
||||||
index = "index.html";
|
index = "index.html";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "contact@elliehigh.com";
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,14 +8,9 @@
|
||||||
group = "turnserver";
|
group = "turnserver";
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme.certs."turn.ellie.town" = {
|
||||||
acceptTerms = true;
|
|
||||||
defaults.email = "wizzeh@protonmail.com";
|
|
||||||
certs."turn.ellie.town" = {
|
|
||||||
webroot = "/var/lib/acme/acme-challenges";
|
webroot = "/var/lib/acme/acme-challenges";
|
||||||
};
|
};
|
||||||
certs."ellie.town" = { };
|
|
||||||
};
|
|
||||||
|
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
|
|
@ -25,8 +20,6 @@
|
||||||
allowedTCPPorts = [
|
allowedTCPPorts = [
|
||||||
3478
|
3478
|
||||||
5349
|
5349
|
||||||
80
|
|
||||||
443
|
|
||||||
];
|
];
|
||||||
allowedUDPPortRanges = [
|
allowedUDPPortRanges = [
|
||||||
{
|
{
|
||||||
|
|
@ -62,7 +55,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
|
||||||
virtualHosts."turn.ellie.town" = {
|
virtualHosts."turn.ellie.town" = {
|
||||||
locations."/.well-known/acme-challenge/" = {
|
locations."/.well-known/acme-challenge/" = {
|
||||||
root = "/var/lib/acme/acme-challenges";
|
root = "/var/lib/acme/acme-challenges";
|
||||||
|
|
|
||||||
15
services/nginx.nix
Normal file
15
services/nginx.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
security.acme = {
|
||||||
|
acceptTerms = true;
|
||||||
|
defaults.email = "wizzeh@protonmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
|
|
||||||
|
services.nginx.enable = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue