From 4c42e0beb65d2a92e988a81aa12f50aa6bd1f820 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 16 Jul 2020 03:02:07 +0200 Subject: [PATCH] Add assets website for immae --- modules/private/default.nix | 1 + modules/private/environment.nix | 10 +++++ .../monitoring/plugins/notify_by_slack | 2 +- modules/private/websites/default.nix | 1 + .../papa/maison_bbc_static/index.html | 8 ++-- .../private/websites/tools/assets/default.nix | 39 ++++++++++++++++++ .../websites/tools/assets/static/logger.png | Bin 0 -> 2206 bytes .../websites/tools/assets/static/logo.jpg | Bin 0 -> 2628 bytes .../websites/tools/assets/static/logo_big.jpg | Bin 0 -> 8815 bytes .../tools/assets/static/monitoring.png | Bin 0 -> 30569 bytes .../tools/assets/static/photos/ct.jpg | Bin 0 -> 55914 bytes .../tools/assets/static/photos/raton.jpg | Bin 0 -> 17614 bytes .../tools/tools/dmarc_reports/index.html | 2 +- .../tools/tools/landing/ldap_password.php | 2 +- 14 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 modules/private/websites/tools/assets/default.nix create mode 100644 modules/private/websites/tools/assets/static/logger.png create mode 100644 modules/private/websites/tools/assets/static/logo.jpg create mode 100644 modules/private/websites/tools/assets/static/logo_big.jpg create mode 100644 modules/private/websites/tools/assets/static/monitoring.png create mode 100644 modules/private/websites/tools/assets/static/photos/ct.jpg create mode 100644 modules/private/websites/tools/assets/static/photos/raton.jpg diff --git a/modules/private/default.nix b/modules/private/default.nix index cf9dc85..2c8ae6c 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix @@ -72,6 +72,7 @@ set = { teliotortayProd = ./websites/telio_tortay/production.nix; # Tools + assetsTools = ./websites/tools/assets; cloudTool = ./websites/tools/cloud; commentoTool = ./websites/tools/commento; davTool = ./websites/tools/dav; diff --git a/modules/private/environment.nix b/modules/private/environment.nix index 069a344..193e95c 100644 --- a/modules/private/environment.nix +++ b/modules/private/environment.nix @@ -856,6 +856,16 @@ in type = submodule { options = { contact = mkOption { type = str; description = "Contact e-mail address"; }; + assets = mkOption { + default = {}; + type = attrsOf (submodule { + options = { + url = mkOption { type = str; description = "URL to fetch"; }; + sha256 = mkOption { type = str; description = "Hash of the url"; }; + }; + }); + description = "Assets to provide on assets.immae.eu"; + }; davical = mkOption { description = "Davical configuration"; type = submodule { diff --git a/modules/private/monitoring/plugins/notify_by_slack b/modules/private/monitoring/plugins/notify_by_slack index b59a403..1b16a0d 100755 --- a/modules/private/monitoring/plugins/notify_by_slack +++ b/modules/private/monitoring/plugins/notify_by_slack @@ -3,7 +3,7 @@ SLACK_CHANNEL="$1" SLACK_USERNAME="Naemon" SLACK_URL="$2" -SLACK_USERICON="https://release.immae.eu/monitoring.png" +SLACK_USERICON="https://assets.immae.eu/monitoring.png" if [ "$SERVICESTATE" = "CRITICAL" ]; then ICON=":exclamation:" diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index c366fd2..94506c9 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix @@ -293,6 +293,7 @@ in telio_tortay.production.enable = true; + tools.assets.enable = true; tools.cloud.enable = true; tools.commento.enable = true; tools.dav.enable = true; diff --git a/modules/private/websites/papa/maison_bbc_static/index.html b/modules/private/websites/papa/maison_bbc_static/index.html index 246a53b..78c318c 100644 --- a/modules/private/websites/papa/maison_bbc_static/index.html +++ b/modules/private/websites/papa/maison_bbc_static/index.html @@ -3,10 +3,10 @@ Pause - - - - + + + +