diff options
Diffstat (limited to 'nixops')
-rw-r--r-- | nixops/modules/websites/capitaines/default.nix | 34 | ||||
-rw-r--r-- | nixops/modules/websites/capitaines/mastodon_static/index.html | 29 | ||||
-rw-r--r-- | nixops/modules/websites/capitaines/mastodon_static/oops.png | bin | 0 -> 120305 bytes | |||
-rw-r--r-- | nixops/modules/websites/default.nix | 2 |
4 files changed, 65 insertions, 0 deletions
diff --git a/nixops/modules/websites/capitaines/default.nix b/nixops/modules/websites/capitaines/default.nix new file mode 100644 index 0000000..7f8f4c6 --- /dev/null +++ b/nixops/modules/websites/capitaines/default.nix | |||
@@ -0,0 +1,34 @@ | |||
1 | { lib, pkgs, config, myconfig, mylibs, ... }: | ||
2 | let | ||
3 | cfg = config.services.myWebsites.Capitaines; | ||
4 | env = myconfig.env.websites.capitaines; | ||
5 | siteDir = ./mastodon_static; | ||
6 | in { | ||
7 | options.services.myWebsites.Capitaines = { | ||
8 | production = { | ||
9 | enable = lib.mkEnableOption "enable Capitaines's website"; | ||
10 | }; | ||
11 | }; | ||
12 | |||
13 | config = lib.mkIf cfg.production.enable { | ||
14 | security.acme.certs."capitaines_mastodon" = config.services.myCertificates.certConfig // { | ||
15 | domain = "mastodon.capitaines.fr"; | ||
16 | }; | ||
17 | |||
18 | services.myWebsites.production.vhostConfs.capitaines = { | ||
19 | certName = "capitaines_mastodon"; | ||
20 | hosts = [ "mastodon.capitaines.fr" ]; | ||
21 | root = siteDir; | ||
22 | extraConfig = [ | ||
23 | '' | ||
24 | ErrorDocument 404 /index.html | ||
25 | <Directory ${siteDir}> | ||
26 | DirectoryIndex index.html | ||
27 | Options Indexes FollowSymLinks MultiViews Includes | ||
28 | Require all granted | ||
29 | </Directory> | ||
30 | '' | ||
31 | ]; | ||
32 | }; | ||
33 | }; | ||
34 | } | ||
diff --git a/nixops/modules/websites/capitaines/mastodon_static/index.html b/nixops/modules/websites/capitaines/mastodon_static/index.html new file mode 100644 index 0000000..fae4152 --- /dev/null +++ b/nixops/modules/websites/capitaines/mastodon_static/index.html | |||
@@ -0,0 +1,29 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html lang='en'> | ||
3 | <head> | ||
4 | <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'> | ||
5 | <title>This instance is now closed - Mastodon</title> | ||
6 | <style> | ||
7 | body { | ||
8 | text-align: center; | ||
9 | background: #282c37; | ||
10 | font-family: sans-serif; | ||
11 | } | ||
12 | img { | ||
13 | max-width: 470px; | ||
14 | width: 100%; | ||
15 | } | ||
16 | h1 { | ||
17 | font-size: 20px; | ||
18 | font-weight: 400; | ||
19 | color: #9baec8; | ||
20 | } | ||
21 | </style> | ||
22 | </head> | ||
23 | <body> | ||
24 | <div> | ||
25 | <img alt='Mastodon' src='/oops.png'> | ||
26 | <h1>Sorry, this instance is closed now.</h1> | ||
27 | </div> | ||
28 | </body> | ||
29 | </html> | ||
diff --git a/nixops/modules/websites/capitaines/mastodon_static/oops.png b/nixops/modules/websites/capitaines/mastodon_static/oops.png new file mode 100644 index 0000000..0abddad --- /dev/null +++ b/nixops/modules/websites/capitaines/mastodon_static/oops.png | |||
Binary files differ | |||
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix index 7bd1ac5..1093617 100644 --- a/nixops/modules/websites/default.nix +++ b/nixops/modules/websites/default.nix | |||
@@ -92,6 +92,7 @@ in | |||
92 | ./connexionswing | 92 | ./connexionswing |
93 | ./tellesflorian | 93 | ./tellesflorian |
94 | ./emilia | 94 | ./emilia |
95 | ./capitaines | ||
95 | ./ftp/jerome.nix | 96 | ./ftp/jerome.nix |
96 | ./ftp/nassime.nix | 97 | ./ftp/nassime.nix |
97 | ./ftp/florian.nix | 98 | ./ftp/florian.nix |
@@ -197,6 +198,7 @@ in | |||
197 | services.myWebsites.Florian.production.enable = cfg.production.enable; | 198 | services.myWebsites.Florian.production.enable = cfg.production.enable; |
198 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; | 199 | services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; |
199 | services.myWebsites.Emilia.production.enable = cfg.production.enable; | 200 | services.myWebsites.Emilia.production.enable = cfg.production.enable; |
201 | services.myWebsites.Capitaines.production.enable = cfg.production.enable; | ||
200 | 202 | ||
201 | services.myWebsites.Chloe.integration.enable = cfg.integration.enable; | 203 | services.myWebsites.Chloe.integration.enable = cfg.integration.enable; |
202 | services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; | 204 | services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; |