aboutsummaryrefslogtreecommitdiff
path: root/machines
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-11-22 09:02:43 -0800
committerFranck Cuny <franck@fcuny.net>2025-11-22 09:02:43 -0800
commit7d27388cd47c8cd849054547d2ad55ea5f41f67d (patch)
tree8f8663fb1f4c878d90a274271f2c277c36439399 /machines
parentwireguard configuration for argonath (diff)
downloadinfra-7d27388cd47c8cd849054547d2ad55ea5f41f67d.tar.gz
configure the reverse proxy on argonath
Diffstat (limited to 'machines')
-rw-r--r--machines/nixos/x86_64-linux/argonath.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/machines/nixos/x86_64-linux/argonath.nix b/machines/nixos/x86_64-linux/argonath.nix
index 14b698a..af70040 100644
--- a/machines/nixos/x86_64-linux/argonath.nix
+++ b/machines/nixos/x86_64-linux/argonath.nix
@@ -6,6 +6,7 @@
}:
{
imports = [
+ ../../../profiles/acme.nix
../../../profiles/cgroups.nix
../../../profiles/defaults.nix
../../../profiles/hardware/do-droplet.nix
@@ -41,6 +42,37 @@
networking.firewall.trustedInterfaces = [ "wg0" ];
networking.firewall.allowedUDPPorts = [ 51871 ];
+ networking.firewall.allowedTCPPorts = [
+ 80
+ 443
+ ];
+
+ services.nginx = {
+ enable = true;
+ recommendedProxySettings = true;
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedTlsSettings = true;
+ virtualHosts = {
+ "code.fcuny.net" = {
+ enableACME = true;
+ acmeRoot = null;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://10.100.0.60";
+ };
+ };
+ "fcuny.net" = {
+ enableACME = true;
+ acmeRoot = null;
+ forceSSL = true;
+ locations."/" = {
+ proxyPass = "http://10.100.0.60:8070";
+ };
+ };
+ };
+ };
+
system.stateVersion = "25.05"; # Did you read the comment?
home-manager = {