aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-29 12:10:53 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-01-29 14:47:04 +0100
commit53b8fad90ea092a5ef958bd0cec50eeff9068538 (patch)
tree411de3813f052417a621727f019449bbe795b6e1 /nixops/modules
parentd578d27021abba83de60143611230c692da46521 (diff)
downloadNix-53b8fad90ea092a5ef958bd0cec50eeff9068538.tar.gz
Nix-53b8fad90ea092a5ef958bd0cec50eeff9068538.tar.zst
Nix-53b8fad90ea092a5ef958bd0cec50eeff9068538.zip
Add Nassime's website
Related issue: https://git.immae.eu/mantisbt/view.php?id=77
Diffstat (limited to 'nixops/modules')
-rw-r--r--nixops/modules/websites/default.nix2
-rw-r--r--nixops/modules/websites/ftp/nassime.nix50
-rw-r--r--nixops/modules/websites/ftp/nassime_goaccess.conf99
3 files changed, 151 insertions, 0 deletions
diff --git a/nixops/modules/websites/default.nix b/nixops/modules/websites/default.nix
index 9befdd1..c439b8d 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 ./ftp/jerome.nix 94 ./ftp/jerome.nix
95 ./ftp/nassime.nix
95 ./tools/db 96 ./tools/db
96 ./tools/tools 97 ./tools/tools
97 ./tools/dav 98 ./tools/dav
@@ -189,6 +190,7 @@ in
189 services.myWebsites.PiedsJaloux.production.enable = cfg.production.enable; 190 services.myWebsites.PiedsJaloux.production.enable = cfg.production.enable;
190 services.myWebsites.Connexionswing.production.enable = cfg.production.enable; 191 services.myWebsites.Connexionswing.production.enable = cfg.production.enable;
191 services.myWebsites.Jerome.production.enable = cfg.production.enable; 192 services.myWebsites.Jerome.production.enable = cfg.production.enable;
193 services.myWebsites.Nassime.production.enable = cfg.production.enable;
192 194
193 services.myWebsites.Chloe.integration.enable = cfg.integration.enable; 195 services.myWebsites.Chloe.integration.enable = cfg.integration.enable;
194 services.myWebsites.Ludivine.integration.enable = cfg.integration.enable; 196 services.myWebsites.Ludivine.integration.enable = cfg.integration.enable;
diff --git a/nixops/modules/websites/ftp/nassime.nix b/nixops/modules/websites/ftp/nassime.nix
new file mode 100644
index 0000000..69576c0
--- /dev/null
+++ b/nixops/modules/websites/ftp/nassime.nix
@@ -0,0 +1,50 @@
1{ lib, pkgs, config, myconfig, mylibs, ... }:
2let
3 cfg = config.services.myWebsites.Nassime;
4 varDir = "/var/lib/ftp/nassime";
5 env = myconfig.env.websites.nassime;
6in {
7 options.services.myWebsites.Nassime = {
8 production = {
9 enable = lib.mkEnableOption "enable Nassime's website";
10 };
11 };
12
13 imports = [
14 ../commons/stats.nix
15 ];
16
17 config = lib.mkIf cfg.production.enable {
18 services.myWebsites.commons.stats.enable = true;
19 services.myWebsites.commons.stats.sites = [
20 {
21 name = "nassime.bouya.org";
22 conf = ./nassime_goaccess.conf;
23 }
24 ];
25
26 security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null;
27 security.acme.certs."nassime" = config.services.myCertificates.certConfig // {
28 domain = "nassime.bouya.org";
29 };
30
31 services.myWebsites.production.vhostConfs.nassime = {
32 certName = "nassime";
33 hosts = ["nassime.bouya.org" ];
34 root = varDir;
35 extraConfig = [
36 ''
37 Use Stats nassime.bouya.org
38 ServerAdmin ${env.server_admin}
39
40 <Directory ${varDir}>
41 DirectoryIndex index.php index.htm index.html
42 Options Indexes FollowSymLinks MultiViews Includes
43 AllowOverride None
44 Require all granted
45 </Directory>
46 ''
47 ];
48 };
49 };
50}
diff --git a/nixops/modules/websites/ftp/nassime_goaccess.conf b/nixops/modules/websites/ftp/nassime_goaccess.conf
new file mode 100644
index 0000000..6fca86c
--- /dev/null
+++ b/nixops/modules/websites/ftp/nassime_goaccess.conf
@@ -0,0 +1,99 @@
1time-format %H:%M:%S
2date-format %d/%b/%Y
3
4#sur immae.eu
5#log-format %v %h %^[%d:%t %^] "%r" %s %b "%R" "%u" $^
6
7log-format VCOMBINED
8#= %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
9
10html-prefs {"theme":"bright","layout":"vertical"}
11
12exclude-ip 188.165.209.148
13exclude-ip 178.33.252.96
14exclude-ip 2001:41d0:2:9c94::1
15exclude-ip 2001:41d0:2:9c94::
16exclude-ip 176.9.151.89
17exclude-ip 2a01:4f8:160:3445::
18exclude-ip 82.255.56.72
19
20no-query-string true
21
22keep-db-files true
23load-from-disk true
24db-path /var/lib/goaccess/nassime.bouya.org
25
26ignore-panel REFERRERS
27ignore-panel KEYPHRASES
28
29static-file .css
30static-file .js
31static-file .jpg
32static-file .png
33static-file .gif
34static-file .ico
35static-file .jpeg
36static-file .pdf
37static-file .csv
38static-file .mpeg
39static-file .mpg
40static-file .swf
41static-file .woff
42static-file .woff2
43static-file .xls
44static-file .xlsx
45static-file .doc
46static-file .docx
47static-file .ppt
48static-file .pptx
49static-file .txt
50static-file .zip
51static-file .ogg
52static-file .mp3
53static-file .mp4
54static-file .exe
55static-file .iso
56static-file .gz
57static-file .rar
58static-file .svg
59static-file .bmp
60static-file .tar
61static-file .tgz
62static-file .tiff
63static-file .tif
64static-file .ttf
65static-file .flv
66#static-file .less
67#static-file .ac3
68#static-file .avi
69#static-file .bz2
70#static-file .class
71#static-file .cue
72#static-file .dae
73#static-file .dat
74#static-file .dts
75#static-file .ejs
76#static-file .eot
77#static-file .eps
78#static-file .img
79#static-file .jar
80#static-file .map
81#static-file .mid
82#static-file .midi
83#static-file .ogv
84#static-file .webm
85#static-file .mkv
86#static-file .odp
87#static-file .ods
88#static-file .odt
89#static-file .otf
90#static-file .pict
91#static-file .pls
92#static-file .ps
93#static-file .qt
94#static-file .rm
95#static-file .svgz
96#static-file .wav
97#static-file .webp
98
99