Files
nixos-config/nixos-configurations/server/default.nix

67 lines
1.4 KiB
Nix
Raw Normal View History

2023-08-01 21:58:41 +00:00
{ inputs, pkgs, ... }:
2023-07-02 00:18:17 +02:00
{
imports = [
./hardware-configuration.nix
../shared.nix
];
2023-07-29 22:59:36 +02:00
networking = {
2023-07-29 23:01:20 +02:00
hostName = "server";
2023-07-29 22:59:36 +02:00
firewall = {
allowedTCPPorts = [ 80 443 25565 ];
};
};
2023-07-24 15:17:18 +02:00
2023-07-29 22:33:53 +02:00
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;
};
2023-07-23 04:24:55 +02:00
};
2023-07-29 22:33:53 +02:00
openssh = {
enable = true;
};
nginx = {
enable = true;
virtualHosts = {
"thilohohlt.com" = {
2023-07-29 23:19:54 +02:00
enableACME = true;
forceSSL = true;
2023-07-29 22:33:53 +02:00
root = inputs.website;
};
2023-08-01 21:58:41 +00:00
"aurora.thilohohlt.com" = {
enableACME = true;
forceSSL = true;
2023-08-01 23:28:39 +00:00
root = inputs.aurora-blog-template.packages.${pkgs.system}.default;
2023-08-01 21:58:41 +00:00
};
2023-07-29 22:33:53 +02:00
};
2023-07-23 04:24:55 +02:00
};
2023-07-24 14:38:54 +02:00
};
2023-07-29 23:19:54 +02:00
security.acme = {
acceptTerms = true;
2023-07-29 23:21:23 +02:00
defaults.email = "thilo.hohlt@tutanota.com";
2023-07-29 23:19:54 +02:00
};
2023-07-24 14:38:54 +02:00
users.users.thiloho.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAy1KnXinQJNcGpWTe1jifNuUEfKZRmyshVX5fPEWR19 thiloho@pc"
];
2023-07-02 00:18:17 +02:00
home-manager.users.thiloho = { pkgs, lib, ... }: {
home.stateVersion = "23.05";
};
system.stateVersion = "23.05";
}