Add nginx for static websites

This commit is contained in:
thiloho
2023-07-29 22:33:53 +02:00
parent d2fd6028a0
commit afc455b419
3 changed files with 88 additions and 20 deletions

View File

@@ -1,4 +1,4 @@
{ ... }:
{ inputs, ... }:
{
imports = [
@@ -8,25 +8,36 @@
networking.hostName = "server";
services.minecraft-server = {
enable = true;
eula = true;
declarative = true;
openFirewall = true;
whitelist = {
thilo_ho = "4e4d744d-7748-46bc-add8-b3e8ca3b4cf5";
services = {
minecraft-server = {
enable = true;
eula = true;
declarative = true;
openFirewall = true;
whitelist = {
thilo_ho = "4e4d744d-7748-46bc-add8-b3e8ca3b4cf5";
};
serverProperties = {
difficulty = 3;
max-players = 10;
motd = "Minecraft server of Thilo.";
white-list = true;
};
};
serverProperties = {
difficulty = 3;
max-players = 10;
motd = "Minecraft server of Thilo.";
white-list = true;
openssh = {
enable = true;
};
nginx = {
enable = true;
virtualHosts = {
"thilohohlt.com" = {
root = inputs.website;
locations."/" = {
proxyPass = "http://localhost:1000";
};
};
};
};
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
users.users.thiloho.openssh.authorizedKeys.keys = [