diff options
Diffstat (limited to 'modules/private')
-rw-r--r-- | modules/private/default.nix | 2 | ||||
-rw-r--r-- | modules/private/websites/default.nix | 2 | ||||
-rw-r--r-- | modules/private/websites/nathanael/villon.nix | 42 |
3 files changed, 46 insertions, 0 deletions
diff --git a/modules/private/default.nix b/modules/private/default.nix index dbb8361..4777238 100644 --- a/modules/private/default.nix +++ b/modules/private/default.nix | |||
@@ -53,6 +53,8 @@ set = { | |||
53 | 53 | ||
54 | nassimeProd = ./websites/nassime/production.nix; | 54 | nassimeProd = ./websites/nassime/production.nix; |
55 | 55 | ||
56 | nathanaelVillon = ./websites/nathanael/villon.nix; | ||
57 | |||
56 | papaMaisonBbc = ./websites/papa/maison_bbc.nix; | 58 | papaMaisonBbc = ./websites/papa/maison_bbc.nix; |
57 | papaSurveillance = ./websites/papa/surveillance.nix; | 59 | papaSurveillance = ./websites/papa/surveillance.nix; |
58 | 60 | ||
diff --git a/modules/private/websites/default.nix b/modules/private/websites/default.nix index 5c33e1c..2cc6c81 100644 --- a/modules/private/websites/default.nix +++ b/modules/private/websites/default.nix | |||
@@ -270,6 +270,8 @@ in | |||
270 | 270 | ||
271 | nassime.production.enable = true; | 271 | nassime.production.enable = true; |
272 | 272 | ||
273 | nathanael.villon.enable = true; | ||
274 | |||
273 | papa = { | 275 | papa = { |
274 | surveillance.enable = true; | 276 | surveillance.enable = true; |
275 | maison_bbc.enable = true; | 277 | maison_bbc.enable = true; |
diff --git a/modules/private/websites/nathanael/villon.nix b/modules/private/websites/nathanael/villon.nix new file mode 100644 index 0000000..7482de1 --- /dev/null +++ b/modules/private/websites/nathanael/villon.nix | |||
@@ -0,0 +1,42 @@ | |||
1 | { lib, pkgs, config, ... }: | ||
2 | let | ||
3 | cfg = config.myServices.websites.nathanael.villon; | ||
4 | varDir = "/var/lib/ftp/nathanael"; | ||
5 | env = config.myEnv.websites.nathanael; | ||
6 | domain = "sntvillon.immae.eu"; | ||
7 | apacheUser = config.services.httpd.Prod.user; | ||
8 | apacheGroup = config.services.httpd.Prod.group; | ||
9 | in { | ||
10 | options.myServices.websites.nathanael.villon.enable = lib.mkEnableOption "enable Nathanael's website"; | ||
11 | |||
12 | config = lib.mkIf cfg.enable { | ||
13 | services.webstats.sites = [ { name = domain; } ]; | ||
14 | |||
15 | system.activationScripts.nathanael_villon = { | ||
16 | deps = [ "users" ]; | ||
17 | text = '' | ||
18 | install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} | ||
19 | ''; | ||
20 | }; | ||
21 | security.acme.certs."ftp".extraDomains."${domain}" = null; | ||
22 | |||
23 | services.websites.env.production.vhostConfs.nathanael_villon = { | ||
24 | certName = "nathanael"; | ||
25 | certMainHost = domain; | ||
26 | hosts = [ domain ]; | ||
27 | root = varDir; | ||
28 | extraConfig = [ | ||
29 | '' | ||
30 | Use Stats ${domain} | ||
31 | |||
32 | <Directory ${varDir}> | ||
33 | DirectoryIndex index.htm index.html | ||
34 | Options Indexes FollowSymLinks MultiViews Includes | ||
35 | AllowOverride None | ||
36 | Require all granted | ||
37 | </Directory> | ||
38 | '' | ||
39 | ]; | ||
40 | }; | ||
41 | }; | ||
42 | } | ||