diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-07-16 03:02:07 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-07-17 01:03:17 +0200 |
commit | 4c42e0beb65d2a92e988a81aa12f50aa6bd1f820 (patch) | |
tree | 56c7ff14e0c2774634f53365b2a2342e0dbd2419 /modules/private/websites | |
parent | 5a61f6ad5164a735be26e016c59e72252ffb49b7 (diff) | |
download | Nix-4c42e0beb65d2a92e988a81aa12f50aa6bd1f820.tar.gz Nix-4c42e0beb65d2a92e988a81aa12f50aa6bd1f820.tar.zst Nix-4c42e0beb65d2a92e988a81aa12f50aa6bd1f820.zip |
Add assets website for immae
Diffstat (limited to 'modules/private/websites')
-rw-r--r-- | modules/private/websites/default.nix | 1 | ||||
-rw-r--r-- | modules/private/websites/papa/maison_bbc_static/index.html | 8 | ||||
-rw-r--r-- | modules/private/websites/tools/assets/default.nix | 39 | ||||
-rw-r--r-- | modules/private/websites/tools/assets/static/logger.png | bin | 0 -> 2206 bytes | |||
-rw-r--r-- | modules/private/websites/tools/assets/static/logo.jpg | bin | 0 -> 2628 bytes | |||
-rw-r--r-- | modules/private/websites/tools/assets/static/logo_big.jpg | bin | 0 -> 8815 bytes | |||
-rw-r--r-- | modules/private/websites/tools/assets/static/monitoring.png | bin | 0 -> 30569 bytes | |||
-rw-r--r-- | modules/private/websites/tools/assets/static/photos/ct.jpg | bin | 0 -> 55914 bytes | |||
-rw-r--r-- | modules/private/websites/tools/assets/static/photos/raton.jpg | bin | 0 -> 17614 bytes | |||
-rw-r--r-- | modules/private/websites/tools/tools/dmarc_reports/index.html | 2 | ||||
-rw-r--r-- | modules/private/websites/tools/tools/landing/ldap_password.php | 2 |
11 files changed, 46 insertions, 6 deletions
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 | |||
293 | 293 | ||
294 | telio_tortay.production.enable = true; | 294 | telio_tortay.production.enable = true; |
295 | 295 | ||
296 | tools.assets.enable = true; | ||
296 | tools.cloud.enable = true; | 297 | tools.cloud.enable = true; |
297 | tools.commento.enable = true; | 298 | tools.commento.enable = true; |
298 | tools.dav.enable = true; | 299 | 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 @@ | |||
3 | <head> | 3 | <head> |
4 | <title>Pause</title> | 4 | <title>Pause</title> |
5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
6 | <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | 6 | <script src="https://assets.immae.eu/jquery/3.5.1/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> |
7 | <script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.bundle.min.js" integrity="sha256-TQq84xX6vkwR0Qs1qH5ADkP+MvH0W+9E7TdHJsoIQiM=" crossorigin="anonymous"></script> | 7 | <script src="https://assets.immae.eu/chart.js/2.9.3/Chart.bundle.min.js" integrity="sha256-TQq84xX6vkwR0Qs1qH5ADkP+MvH0W+9E7TdHJsoIQiM=" crossorigin="anonymous"></script> |
8 | <script src="https://cdn.jsdelivr.net/npm/hammerjs@2.0.8"></script> | 8 | <script src="https://assets.immae.eu/hammerjs/2.0.8/hammer.min.js" integrity="sha256-eVNjHw5UeU0jUqPPpZHAkU1z4U+QFBBY488WvueTm88=" crossorigin="anonymous"></script> |
9 | <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-zoom@0.7.7"></script> | 9 | <script src="https://assets.immae.eu/chartjs-plugin-zoom/0.7.7/chartjs-plugin-zoom.min.js" integrity="sha256-6S7w9Wue7EBvlJh/Li/cPecjTNN+yBm/AoCePQA9Xi8=" crossorigin="anonymous"></script> |
10 | <style> | 10 | <style> |
11 | body { | 11 | body { |
12 | padding-left: 5px; | 12 | padding-left: 5px; |
diff --git a/modules/private/websites/tools/assets/default.nix b/modules/private/websites/tools/assets/default.nix new file mode 100644 index 0000000..0eb476d --- /dev/null +++ b/modules/private/websites/tools/assets/default.nix | |||
@@ -0,0 +1,39 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.tools.assets; | ||
4 | assets_urls = lib.mapAttrs (k: v: pkgs.fetchurl v) config.myEnv.tools.assets; | ||
5 | assets = pkgs.runCommand "assets" {} ('' | ||
6 | mkdir -p $out | ||
7 | cp -a ${./static}/* $out/ | ||
8 | '' + builtins.concatStringsSep "\n" | ||
9 | (lib.mapAttrsToList (k: v: '' | ||
10 | install -D -m644 -T ${v} $out/${k} | ||
11 | '') assets_urls)); | ||
12 | in | ||
13 | { | ||
14 | options.myServices.websites.tools.assets = { | ||
15 | enable = lib.mkEnableOption "Enable assets website"; | ||
16 | }; | ||
17 | config = lib.mkIf cfg.enable { | ||
18 | services.websites.env.tools.vhostConfs.assets = { | ||
19 | certName = "eldiron"; | ||
20 | addToCerts = true; | ||
21 | hosts = [ "assets.immae.eu" ]; | ||
22 | root = assets; | ||
23 | extraConfig = [ | ||
24 | '' | ||
25 | Use Apaxy "${assets}" "title" | ||
26 | <Directory "${assets}"> | ||
27 | Options Indexes FollowSymlinks | ||
28 | AllowOverride None | ||
29 | Require all granted | ||
30 | Header always set Last-Modified "Tue, 01 Jan 2020 00:00:00 GMT" | ||
31 | Header always set Cache-Control "public, max-age=31536000, immutable" | ||
32 | Header always set Access-Control-Allow-Origin "*" | ||
33 | Header always set Access-Control-Expose-Headers "*" | ||
34 | </Directory> | ||
35 | '' | ||
36 | ]; | ||
37 | }; | ||
38 | }; | ||
39 | } | ||
diff --git a/modules/private/websites/tools/assets/static/logger.png b/modules/private/websites/tools/assets/static/logger.png new file mode 100644 index 0000000..8e5a2cb --- /dev/null +++ b/modules/private/websites/tools/assets/static/logger.png | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/assets/static/logo.jpg b/modules/private/websites/tools/assets/static/logo.jpg new file mode 100644 index 0000000..d642f7d --- /dev/null +++ b/modules/private/websites/tools/assets/static/logo.jpg | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/assets/static/logo_big.jpg b/modules/private/websites/tools/assets/static/logo_big.jpg new file mode 100644 index 0000000..d13a79b --- /dev/null +++ b/modules/private/websites/tools/assets/static/logo_big.jpg | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/assets/static/monitoring.png b/modules/private/websites/tools/assets/static/monitoring.png new file mode 100644 index 0000000..3065643 --- /dev/null +++ b/modules/private/websites/tools/assets/static/monitoring.png | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/assets/static/photos/ct.jpg b/modules/private/websites/tools/assets/static/photos/ct.jpg new file mode 100644 index 0000000..ab7876b --- /dev/null +++ b/modules/private/websites/tools/assets/static/photos/ct.jpg | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/assets/static/photos/raton.jpg b/modules/private/websites/tools/assets/static/photos/raton.jpg new file mode 100644 index 0000000..a859e1c --- /dev/null +++ b/modules/private/websites/tools/assets/static/photos/raton.jpg | |||
Binary files differ | |||
diff --git a/modules/private/websites/tools/tools/dmarc_reports/index.html b/modules/private/websites/tools/tools/dmarc_reports/index.html index af29cdf..0afc82f 100644 --- a/modules/private/websites/tools/tools/dmarc_reports/index.html +++ b/modules/private/websites/tools/tools/dmarc_reports/index.html | |||
@@ -121,7 +121,7 @@ | |||
121 | </table> | 121 | </table> |
122 | </div> | 122 | </div> |
123 | 123 | ||
124 | <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script> | 124 | <script src="https://assets.immae.eu/vue/2.6.11/vue.min.js" integrity="sha256-ngFW3UnAN0Tnm76mDuu7uUtYEcG3G5H1+zioJw3t+68=" crossorigin="anonymous"></script> |
125 | <script src="app.js"></script> | 125 | <script src="app.js"></script> |
126 | </body> | 126 | </body> |
127 | 127 | ||
diff --git a/modules/private/websites/tools/tools/landing/ldap_password.php b/modules/private/websites/tools/tools/landing/ldap_password.php index 8b1f80f..b6079e5 100644 --- a/modules/private/websites/tools/tools/landing/ldap_password.php +++ b/modules/private/websites/tools/tools/landing/ldap_password.php | |||
@@ -86,7 +86,7 @@ Immae / Ismaël", "From: " . getenv("CONTACT_EMAIL")); | |||
86 | <head> | 86 | <head> |
87 | <title>Password Change Page</title> | 87 | <title>Password Change Page</title> |
88 | <meta name="viewport" content="width=device-width, initial-scale=1" /> | 88 | <meta name="viewport" content="width=device-width, initial-scale=1" /> |
89 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" /> | 89 | <link rel="stylesheet" href="https://assets.immae.eu/skeleton/2.0.4/skeleton.min.css" integrity="sha256-2YQRJMXD7pIAPHiXr0s+vlRWA7GYJEK0ARns7k2sbHY=" crossorigin="anonymous" /> |
90 | <style type="text/css"> | 90 | <style type="text/css"> |
91 | body { font-family: Verdana,Arial,Courier New; margin: auto; } | 91 | body { font-family: Verdana,Arial,Courier New; margin: auto; } |
92 | 92 | ||