aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--virtual/eldiron.nix9
-rw-r--r--virtual/modules/websites/default.nix (renamed from virtual/modules/websites.nix)26
2 files changed, 21 insertions, 14 deletions
diff --git a/virtual/eldiron.nix b/virtual/eldiron.nix
index ad94fb2..fa5cb51 100644
--- a/virtual/eldiron.nix
+++ b/virtual/eldiron.nix
@@ -28,7 +28,7 @@
28 ./modules/gitolite.nix 28 ./modules/gitolite.nix
29 ./modules/gitweb.nix 29 ./modules/gitweb.nix
30 ./modules/databases.nix 30 ./modules/databases.nix
31 ./modules/websites.nix 31 ./modules/websites
32 ]; 32 ];
33 services.myGitolite.enable = true; 33 services.myGitolite.enable = true;
34 services.myGitweb.enable = true; 34 services.myGitweb.enable = true;
@@ -39,13 +39,8 @@
39 networking = { 39 networking = {
40 firewall = { 40 firewall = {
41 enable = true; 41 enable = true;
42 allowedTCPPorts = [ 22 80 443 9418 ]; 42 allowedTCPPorts = [ 22 9418 ];
43 }; 43 };
44 interfaces."eth0".ipv4.addresses = [
45 # 176.9.151.89 declared in nixops -> infra / tools
46 { address = myconfig.ips.production; prefixLength = 32; }
47 { address = myconfig.ips.integration; prefixLength = 32; }
48 ];
49 }; 44 };
50 45
51 deployment = { 46 deployment = {
diff --git a/virtual/modules/websites.nix b/virtual/modules/websites/default.nix
index d794c7a..14b9998 100644
--- a/virtual/modules/websites.nix
+++ b/virtual/modules/websites/default.nix
@@ -59,16 +59,16 @@ let
59in 59in
60{ 60{
61 imports = [ 61 imports = [
62 ./websites/chloe 62 ./chloe
63 ./websites/ludivine 63 ./ludivine
64 ./websites/aten 64 ./aten
65 ./websites/piedsjaloux 65 ./piedsjaloux
66 ./websites/connexionswing 66 ./connexionswing
67 # built using: 67 # built using:
68 # sed -e "s/services\.httpd/services\.httpdProd/g" .nix-defexpr/channels/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix 68 # sed -e "s/services\.httpd/services\.httpdProd/g" .nix-defexpr/channels/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix
69 # And removed users / groups 69 # And removed users / groups
70 ./websites/apache/httpd_prod.nix 70 ./apache/httpd_prod.nix
71 ./websites/apache/httpd_inte.nix 71 ./apache/httpd_inte.nix
72 ]; 72 ];
73 73
74 options.services.myWebsites = { 74 options.services.myWebsites = {
@@ -95,6 +95,18 @@ in
95 }; 95 };
96 96
97 config = { 97 config = {
98 networking = {
99 firewall = {
100 enable = true;
101 allowedTCPPorts = [ 80 443 ];
102 };
103 interfaces."eth0".ipv4.addresses = [
104 # 176.9.151.89 declared in nixops -> infra / tools
105 { address = myconfig.ips.production; prefixLength = 32; }
106 { address = myconfig.ips.integration; prefixLength = 32; }
107 ];
108 };
109
98 services.myWebsites.Chloe.production.enable = cfg.production.enable; 110 services.myWebsites.Chloe.production.enable = cfg.production.enable;
99 services.myWebsites.Ludivine.production.enable = cfg.production.enable; 111 services.myWebsites.Ludivine.production.enable = cfg.production.enable;
100 services.myWebsites.Aten.production.enable = cfg.production.enable; 112 services.myWebsites.Aten.production.enable = cfg.production.enable;