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