aboutsummaryrefslogtreecommitdiff
path: root/node/spoutnik.nix
diff options
context:
space:
mode:
Diffstat (limited to 'node/spoutnik.nix')
-rw-r--r--node/spoutnik.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/node/spoutnik.nix b/node/spoutnik.nix
index 55df7d7..4aa6f91 100644
--- a/node/spoutnik.nix
+++ b/node/spoutnik.nix
@@ -24,5 +24,41 @@
ips = [ "10.42.0.2/16" ];
listenPort = 42136;
};
+
+ # Nginx configuration:
+
+ services.nginx = {
+ enable = true;
+
+ # Use recommended settings
+ recommendedGzipSettings = true;
+ recommendedOptimisation = true;
+ recommendedProxySettings = true;
+ recommendedTlsSettings = true;
+
+ # Add any further config to match your needs, e.g.:
+ virtualHosts = let
+ base = locations: {
+ inherit locations;
+
+ forceSSL = true;
+ enableACME = true;
+ };
+ proxy = addr: port: base {
+ "/".proxyPass = "http://" + addr + ":" + toString(port);
+ };
+ in {
+ "axl.deuxfleurs.fr" = proxy "192.168.0.60" 80;
+ "warez.luxeylab.net" = proxy "192.168.0.50" 80;
+ };
+ };
+
+
+ # ACME:
+
+ security.acme = {
+ acceptTerms = true;
+ email = "adrien@luxeylab.net";
+ };
}