]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/florian/production.nix
Refactor websites
[perso/Immae/Config/Nix.git] / modules / private / websites / florian / production.nix
index 16c6022888357c61f8ce4e9936c2aa148c9b4bd5..1c5ffa639e5f417aaa00c5a43c320fe04a0d2cfa 100644 (file)
@@ -1,9 +1,9 @@
 { lib, pkgs, config,  ... }:
 let
-    adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; };
-    cfg = config.myServices.websites.florian.production;
-    varDir = "/var/lib/ftp/florian";
-    env = config.myEnv.websites.florian;
+  adminer = pkgs.callPackage ../commons/adminer.nix { inherit config; };
+  cfg = config.myServices.websites.florian.production;
+  varDir = "/var/lib/ftp/florian/tellesflorian.com";
+  env = config.myEnv.websites.florian;
 in {
   options.myServices.websites.florian.production.enable = lib.mkEnableOption "enable Florian's website production";
 
@@ -11,17 +11,17 @@ in {
     security.acme.certs."ftp".extraDomains."tellesflorian.com" = null;
 
     services.websites.env.production.modules = adminer.apache.modules;
-    services.websites.env.production.vhostConfs.florian = {
+    services.websites.env.production.vhostConfs.florian_production = {
       certName     = "florian";
       certMainHost = "tellesflorian.com";
       hosts        = [ "tellesflorian.com" "www.tellesflorian.com" ];
-      root         = "${varDir}/tellesflorian.com";
+      root         = varDir;
       extraConfig  = [
         (adminer.apache.vhostConf null)
         ''
         ServerAdmin ${env.server_admin}
 
-        <Directory ${varDir}/tellesflorian.com>
+        <Directory ${varDir}>
           DirectoryIndex index.php index.htm index.html
           Options Indexes FollowSymLinks MultiViews Includes
           AllowOverride None