]>
Commit | Line | Data |
---|---|---|
1 | { lib, pkgs, config, ... }: | |
2 | let | |
3 | cfg = config.myServices.websites.nassime.production; | |
4 | varDir = "/var/lib/ftp/nassime"; | |
5 | env = config.myEnv.websites.nassime; | |
6 | domain = "nassime.bouya.org"; | |
7 | in { | |
8 | options.myServices.websites.nassime.production.enable = lib.mkEnableOption "enable Nassime's website"; | |
9 | ||
10 | config = lib.mkIf cfg.enable { | |
11 | services.webstats.sites = [ { name = domain; } ]; | |
12 | ||
13 | security.acme.certs."ftp".extraDomains."${domain}" = null; | |
14 | ||
15 | services.websites.env.production.vhostConfs.nassime = { | |
16 | certName = "nassime"; | |
17 | certMainHost = domain; | |
18 | hosts = [ domain ]; | |
19 | root = varDir; | |
20 | extraConfig = [ | |
21 | '' | |
22 | Use Stats ${domain} | |
23 | ServerAdmin ${env.server_admin} | |
24 | ||
25 | <Directory ${varDir}> | |
26 | DirectoryIndex index.htm index.html | |
27 | Options Indexes FollowSymLinks MultiViews Includes | |
28 | AllowOverride None | |
29 | Require all granted | |
30 | </Directory> | |
31 | '' | |
32 | ]; | |
33 | }; | |
34 | }; | |
35 | } |