]>
Commit | Line | Data |
---|---|---|
8722d693 IB |
1 | { lib, pkgs, config, ... }: |
2 | let | |
87949cb9 IB |
3 | cfg = config.myServices.websites.nath.villon; |
4 | varDir = "/var/lib/ftp/nath"; | |
5 | env = config.myEnv.websites.nath; | |
8722d693 IB |
6 | domain = "sntvillon.immae.eu"; |
7 | apacheUser = config.services.httpd.Prod.user; | |
8 | apacheGroup = config.services.httpd.Prod.group; | |
9 | in { | |
87949cb9 | 10 | options.myServices.websites.nath.villon.enable = lib.mkEnableOption "enable Nath's website"; |
8722d693 IB |
11 | |
12 | config = lib.mkIf cfg.enable { | |
13 | services.webstats.sites = [ { name = domain; } ]; | |
14 | ||
87949cb9 | 15 | system.activationScripts.nath_villon = { |
8722d693 IB |
16 | deps = [ "users" ]; |
17 | text = '' | |
18 | install -m 0755 -o ${apacheUser} -g ${apacheGroup} -d ${varDir} | |
19 | ''; | |
20 | }; | |
21 | security.acme.certs."ftp".extraDomains."${domain}" = null; | |
22 | ||
87949cb9 IB |
23 | services.websites.env.production.vhostConfs.nath_villon = { |
24 | certName = "nath"; | |
8722d693 IB |
25 | certMainHost = domain; |
26 | hosts = [ domain ]; | |
27 | root = varDir; | |
28 | extraConfig = [ | |
29 | '' | |
30 | Use Stats ${domain} | |
31 | ||
32 | <Directory ${varDir}> | |
33 | DirectoryIndex index.htm index.html | |
34 | Options Indexes FollowSymLinks MultiViews Includes | |
35 | AllowOverride None | |
36 | Require all granted | |
37 | </Directory> | |
38 | '' | |
39 | ]; | |
40 | }; | |
41 | }; | |
42 | } |