]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Move some more configuration for websites
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 10 Jan 2019 22:29:52 +0000 (23:29 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 10 Jan 2019 22:29:52 +0000 (23:29 +0100)
virtual/eldiron.nix
virtual/modules/websites/default.nix [moved from virtual/modules/websites.nix with 93% similarity]

index ad94fb2799b74bf21d122b3741ec57bdb5ab2919..fa5cb5123c95b9b5609fddb3ffc03e77993c3562 100644 (file)
@@ -28,7 +28,7 @@
       ./modules/gitolite.nix
       ./modules/gitweb.nix
       ./modules/databases.nix
-      ./modules/websites.nix
+      ./modules/websites
     ];
     services.myGitolite.enable = true;
     services.myGitweb.enable = true;
     networking = {
       firewall = {
         enable = true;
-        allowedTCPPorts = [ 22 80 443 9418 ];
+        allowedTCPPorts = [ 22 9418 ];
       };
-      interfaces."eth0".ipv4.addresses = [
-        # 176.9.151.89 declared in nixops -> infra / tools
-        { address = myconfig.ips.production; prefixLength = 32; }
-        { address = myconfig.ips.integration; prefixLength = 32; }
-      ];
     };
 
     deployment = {
similarity index 93%
rename from virtual/modules/websites.nix
rename to virtual/modules/websites/default.nix
index d794c7a90efd5ba75979fdabac6d3a7244cba96e..14b99983a0300b6ed0576b7d4cff64682ab5aa8f 100644 (file)
@@ -59,16 +59,16 @@ let
 in
 {
   imports = [
-    ./websites/chloe
-    ./websites/ludivine
-    ./websites/aten
-    ./websites/piedsjaloux
-    ./websites/connexionswing
+    ./chloe
+    ./ludivine
+    ./aten
+    ./piedsjaloux
+    ./connexionswing
     # built using:
     # sed -e "s/services\.httpd/services\.httpdProd/g" .nix-defexpr/channels/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix
     # And removed users / groups
-    ./websites/apache/httpd_prod.nix
-    ./websites/apache/httpd_inte.nix
+    ./apache/httpd_prod.nix
+    ./apache/httpd_inte.nix
   ];
 
   options.services.myWebsites = {
@@ -95,6 +95,18 @@ in
   };
 
   config = {
+    networking = {
+      firewall = {
+        enable = true;
+        allowedTCPPorts = [ 80 443 ];
+      };
+      interfaces."eth0".ipv4.addresses = [
+        # 176.9.151.89 declared in nixops -> infra / tools
+        { address = myconfig.ips.production; prefixLength = 32; }
+        { address = myconfig.ips.integration; prefixLength = 32; }
+      ];
+    };
+
     services.myWebsites.Chloe.production.enable = cfg.production.enable;
     services.myWebsites.Ludivine.production.enable = cfg.production.enable;
     services.myWebsites.Aten.production.enable = cfg.production.enable;