]>
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 | ||
53b8fad9 | 13 | config = lib.mkIf cfg.production.enable { |
9eae2b47 | 14 | services.webstats.sites = [ { name = "nassime.bouya.org"; } ]; |
53b8fad9 IB |
15 | |
16 | security.acme.certs."ftp".extraDomains."nassime.bouya.org" = null; | |
17 | security.acme.certs."nassime" = config.services.myCertificates.certConfig // { | |
18 | domain = "nassime.bouya.org"; | |
19 | }; | |
20 | ||
21 | services.myWebsites.production.vhostConfs.nassime = { | |
22 | certName = "nassime"; | |
23 | hosts = ["nassime.bouya.org" ]; | |
24 | root = varDir; | |
25 | extraConfig = [ | |
26 | '' | |
27 | Use Stats nassime.bouya.org | |
28 | ServerAdmin ${env.server_admin} | |
29 | ||
30 | <Directory ${varDir}> | |
31 | DirectoryIndex index.php index.htm index.html | |
32 | Options Indexes FollowSymLinks MultiViews Includes | |
33 | AllowOverride None | |
34 | Require all granted | |
35 | </Directory> | |
36 | '' | |
37 | ]; | |
38 | }; | |
39 | }; | |
40 | } |