diff options
author | TheArcaneBrony <myrainbowdash949@gmail.com> | 2023-03-28 21:03:46 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-06-05 15:49:34 +0200 |
commit | 7010d98995fea8eda3c578fbfd13aecca918b7d9 (patch) | |
tree | 37d2add1bf249828a12e820fd6225fe2eb57fd32 /host/Spacebar-nginx/configuration.nix | |
download | Spacebar-Open-Infrastructure-7010d98995fea8eda3c578fbfd13aecca918b7d9.tar.xz |
Initial commit
Diffstat (limited to 'host/Spacebar-nginx/configuration.nix')
-rwxr-xr-x | host/Spacebar-nginx/configuration.nix | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/host/Spacebar-nginx/configuration.nix b/host/Spacebar-nginx/configuration.nix new file mode 100755 index 0000000..19b8dc0 --- /dev/null +++ b/host/Spacebar-nginx/configuration.nix @@ -0,0 +1,37 @@ +{ config, pkgs, lib, ... }: + +{ + imports = + [ + ../../modules/base-server.nix + ]; + + networking = { + hostName = "Spacebar-nginx"; + interfaces.ens18.ipv4.addresses = [ { + address = "192.168.1.2"; + prefixLength = 24; + } ]; + interfaces.ens19.ipv4.addresses = [ { + address = "10.10.11.2"; + prefixLength = 16; + } ]; + }; + + services = { + nginx = { + enable = true; + package = pkgs.nginxQuic; + recommendedProxySettings = true; + recommendedTlsSettings = true; + virtualHosts = { + "mail.spacebar.chat" = import ./hosts/spacebar.chat/mail.nix; + }; + }; + }; + systemd.services.nginx.requires = [ "data.mount" ]; + security.acme.acceptTerms = true; + security.acme.defaults.email = "chris@spacebar.chat"; + + system.stateVersion = "22.11"; # DO NOT EDIT! +} |