From f8026b6e4c869aa108f6361c8ccd50890657994d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 18 May 2019 10:49:00 +0200 Subject: Move personal websites to modules --- modules/private/websites/florian/integration.nix | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 modules/private/websites/florian/integration.nix (limited to 'modules/private/websites/florian/integration.nix') 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 @@ +{ lib, pkgs, config, myconfig, ... }: +let + adminer = pkgs.callPackage ../commons/adminer.nix {}; + cfg = config.myServices.websites.florian.integration; + varDir = "/var/lib/ftp/florian"; + env = myconfig.env.websites.florian; +in { + options.myServices.websites.florian.integration.enable = lib.mkEnableOption "enable Florian's website integration"; + + config = lib.mkIf cfg.enable { + security.acme.certs."ftp".extraDomains."florian.immae.eu" = null; + + services.websites.integration.modules = adminer.apache.modules; + services.websites.integration.vhostConfs.florian = { + certName = "eldiron"; + addToCerts = true; + hosts = [ "florian.immae.eu" ]; + root = "${varDir}/florian.immae.eu"; + extraConfig = [ + adminer.apache.vhostConf + '' + ServerAdmin ${env.server_admin} + + + DirectoryIndex index.php index.htm index.html + Options Indexes FollowSymLinks MultiViews Includes + AllowOverride None + Require all granted + + '' + ]; + }; + }; +} -- cgit v1.2.3