Setup mail server and restructure some things
This commit is contained in:
parent
fa3db3bad6
commit
4a802ab44d
90 changed files with 512 additions and 66 deletions
17
config/hosts/web-nonpublic-linuxcrewd/configuration.nix
Normal file
17
config/hosts/web-nonpublic-linuxcrewd/configuration.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/vda";
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "web-nonpublic-linuxcrewd";
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [ 80 443 ];
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
7
config/hosts/web-nonpublic-linuxcrewd/default.nix
Normal file
7
config/hosts/web-nonpublic-linuxcrewd/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./nginx.nix
|
||||
];
|
||||
}
|
29
config/hosts/web-nonpublic-linuxcrewd/nginx.nix
Normal file
29
config/hosts/web-nonpublic-linuxcrewd/nginx.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts."_" = {
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 80;
|
||||
}];
|
||||
locations."/" = {
|
||||
return = "301 https://$host$request_uri";
|
||||
};
|
||||
};
|
||||
|
||||
streamConfig = ''
|
||||
map $ssl_preread_server_name $address {
|
||||
jellyfin.grzb.de 10.202.46.101:8443;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 0.0.0.0:443;
|
||||
proxy_pass $address;
|
||||
ssl_preread on;
|
||||
proxy_protocol on;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue