aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/florian/integration.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-18 10:49:00 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-05-18 10:49:00 +0200
commitf8026b6e4c869aa108f6361c8ccd50890657994d (patch)
tree57cb311e520933bd2ab6ccbae05f2913799eb49e /modules/private/websites/florian/integration.nix
parent4aac110f17f0528d90510eec00c9a8df60bcf04f (diff)
downloadNix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.gz
Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.tar.zst
Nix-f8026b6e4c869aa108f6361c8ccd50890657994d.zip
Move personal websites to modules
Diffstat (limited to 'modules/private/websites/florian/integration.nix')
-rw-r--r--modules/private/websites/florian/integration.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/modules/private/websites/florian/integration.nix b/modules/private/websites/florian/integration.nix
new file mode 100644
index 0000000..424ebd4
--- /dev/null
+++ b/modules/private/websites/florian/integration.nix
@@ -0,0 +1,34 @@
1{ lib, pkgs, config, myconfig, ... }:
2let
3 adminer = pkgs.callPackage ../commons/adminer.nix {};
4 cfg = config.myServices.websites.florian.integration;
5 varDir = "/var/lib/ftp/florian";
6 env = myconfig.env.websites.florian;
7in {
8 options.myServices.websites.florian.integration.enable = lib.mkEnableOption "enable Florian's website integration";
9
10 config = lib.mkIf cfg.enable {
11 security.acme.certs."ftp".extraDomains."florian.immae.eu" = null;
12
13 services.websites.integration.modules = adminer.apache.modules;
14 services.websites.integration.vhostConfs.florian = {
15 certName = "eldiron";
16 addToCerts = true;
17 hosts = [ "florian.immae.eu" ];
18 root = "${varDir}/florian.immae.eu";
19 extraConfig = [
20 adminer.apache.vhostConf
21 ''
22 ServerAdmin ${env.server_admin}
23
24 <Directory ${varDir}/florian.immae.eu>
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}