diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-10 23:29:52 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-10 23:29:52 +0100 |
commit | 54307da49e9975ca3cce0d45fd12ade016cf90d9 (patch) | |
tree | 5b9011f809e631f0a43bb21a1aa893c6279df8d6 /virtual | |
parent | 091ae73429b8853e6ab971bffaccd84bdd59f40d (diff) | |
download | Nix-54307da49e9975ca3cce0d45fd12ade016cf90d9.tar.gz Nix-54307da49e9975ca3cce0d45fd12ade016cf90d9.tar.zst Nix-54307da49e9975ca3cce0d45fd12ade016cf90d9.zip |
Move some more configuration for websites
Diffstat (limited to 'virtual')
-rw-r--r-- | virtual/eldiron.nix | 9 | ||||
-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 | |||
59 | in | 59 | in |
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; |