]>
Commit | Line | Data |
---|---|---|
53b8fad9 IB |
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 = [ | |
b7ee93fc | 20 | { name = "nassime.bouya.org"; } |
53b8fad9 IB |
21 | ]; |
22 | ||
23 | security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null; | |
24 | security.acme.certs."nassime" = config.services.myCertificates.certConfig // { | |
25 | domain = "nassime.bouya.org"; | |
26 | }; | |
27 | ||
28 | services.myWebsites.production.vhostConfs.nassime = { | |
29 | certName = "nassime"; | |
30 | hosts = ["nassime.bouya.org" ]; | |
31 | root = varDir; | |
32 | extraConfig = [ | |
33 | '' | |
34 | Use Stats nassime.bouya.org | |
35 | ServerAdmin ${env.server_admin} | |
36 | ||
37 | <Directory ${varDir}> | |
38 | DirectoryIndex index.php index.htm index.html | |
39 | Options Indexes FollowSymLinks MultiViews Includes | |
40 | AllowOverride None | |
41 | Require all granted | |
42 | </Directory> | |
43 | '' | |
44 | ]; | |
45 | }; | |
46 | }; | |
47 | } |