From: Ismaƫl Bouya Date: Tue, 29 Jan 2019 22:59:49 +0000 (+0100) Subject: Add capitaines mastodon pages X-Git-Tag: nur_publish~268 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=commitdiff_plain;h=10bd8c08a3bbd9e0e5f5b25ffb278b8385083bd0;hp=9a35b8f94cc55ee429b36be1a5e7eb1f52934a34 Add capitaines mastodon pages --- 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 @@ +{ lib, pkgs, config, myconfig, mylibs, ... }: +let + cfg = config.services.myWebsites.Capitaines; + env = myconfig.env.websites.capitaines; + siteDir = ./mastodon_static; +in { + options.services.myWebsites.Capitaines = { + production = { + enable = lib.mkEnableOption "enable Capitaines's website"; + }; + }; + + config = lib.mkIf cfg.production.enable { + security.acme.certs."capitaines_mastodon" = config.services.myCertificates.certConfig // { + domain = "mastodon.capitaines.fr"; + }; + + services.myWebsites.production.vhostConfs.capitaines = { + certName = "capitaines_mastodon"; + hosts = [ "mastodon.capitaines.fr" ]; + root = siteDir; + extraConfig = [ + '' + ErrorDocument 404 /index.html + + DirectoryIndex index.html + Options Indexes FollowSymLinks MultiViews Includes + Require all granted + + '' + ]; + }; + }; +} 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 @@ + + + + + This instance is now closed - Mastodon + + + +
+ Mastodon +

Sorry, this instance is closed now.

+
+ + 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 Binary files /dev/null and b/nixops/modules/websites/capitaines/mastodon_static/oops.png 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 ./connexionswing ./tellesflorian ./emilia + ./capitaines ./ftp/jerome.nix ./ftp/nassime.nix ./ftp/florian.nix @@ -197,6 +198,7 @@ in services.myWebsites.Florian.production.enable = cfg.production.enable; services.myWebsites.DeniseJerome.production.enable = cfg.production.enable; services.myWebsites.Emilia.production.enable = cfg.production.enable; + services.myWebsites.Capitaines.production.enable = cfg.production.enable; services.myWebsites.Chloe.integration.enable = cfg.integration.enable; services.myWebsites.Ludivine.integration.enable = cfg.integration.enable;