diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-29 12:10:53 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-29 14:47:04 +0100 |
commit | 53b8fad90ea092a5ef958bd0cec50eeff9068538 (patch) | |
tree | 411de3813f052417a621727f019449bbe795b6e1 /nixops/modules/websites/ftp/nassime.nix | |
parent | d578d27021abba83de60143611230c692da46521 (diff) | |
download | Nix-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/websites/ftp/nassime.nix')
-rw-r--r-- | nixops/modules/websites/ftp/nassime.nix | 50 |
1 files changed, 50 insertions, 0 deletions
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, ... }: | ||
2 | let | ||
3 | cfg = config.services.myWebsites.Nassime; | ||
4 | varDir = "/var/lib/ftp/nassime"; | ||
5 | env = myconfig.env.websites.nassime; | ||
6 | in { | ||
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 | } | ||