]>
Commit | Line | Data |
---|---|---|
ab8f306d | 1 | { lib, pkgs, config, ... }: |
f8026b6e | 2 | let |
d3452fc5 IB |
3 | adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; }; |
4 | cfg = config.myServices.websites.florian.integration; | |
7c5e6fe8 | 5 | varDir = "/var/lib/ftp/florian/www.ft.immae.dev"; |
d3452fc5 | 6 | env = config.myEnv.websites.florian; |
f8026b6e IB |
7 | in { |
8 | options.myServices.websites.florian.integration.enable = lib.mkEnableOption "enable Florian's website integration"; | |
9 | ||
10 | config = lib.mkIf cfg.enable { | |
7c5e6fe8 | 11 | security.acme.certs."ftp".extraDomains."ft.immae.dev" = null; |
f8026b6e | 12 | |
29f8cb85 | 13 | services.websites.env.integration.modules = adminer.apache.modules; |
d3452fc5 | 14 | services.websites.env.integration.vhostConfs.florian_integration = { |
0f71cd76 | 15 | certName = "integration"; |
f8026b6e | 16 | addToCerts = true; |
7c5e6fe8 | 17 | hosts = [ "www.ft.immae.dev" ]; |
d3452fc5 | 18 | root = varDir; |
f8026b6e | 19 | extraConfig = [ |
5400b9b6 | 20 | (adminer.apache.vhostConf null) |
f8026b6e IB |
21 | '' |
22 | ServerAdmin ${env.server_admin} | |
23 | ||
d3452fc5 | 24 | <Directory ${varDir}> |
f8026b6e IB |
25 | DirectoryIndex index.php index.htm index.html |
26 | Options Indexes FollowSymLinks MultiViews Includes | |
27 | AllowOverride None | |
28 | Require all granted | |
29 | </Directory> | |
30 | '' | |
31 | ]; | |
32 | }; | |
33 | }; | |
34 | } |