]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/librezo/website.nix
Cloud Installation for librezo
[perso/Immae/Config/Nix.git] / modules / private / websites / librezo / website.nix
diff --git a/modules/private/websites/librezo/website.nix b/modules/private/websites/librezo/website.nix
new file mode 100644 (file)
index 0000000..8f4cc06
--- /dev/null
@@ -0,0 +1,30 @@
+{ lib, config, pkgs, ... }:
+let
+  cfg = config.myServices.websites.librezo.website;
+  varDir = "/var/lib/ftp/librezo/website";
+  apacheUser = config.services.httpd.Inte.user;
+  apacheGroup = config.services.httpd.Inte.group;
+in {
+  options.myServices.websites.librezo.website.enable = lib.mkEnableOption "enable Librezo website";
+
+  config = lib.mkIf cfg.enable {
+    services.websites.env.integration.vhostConfs.librezo_website = {
+      certName     = "librezo";
+      addToCerts   = true;
+      hosts        = ["web.librezo.immae.dev"];
+      root         = varDir;
+      extraConfig  = [
+        ''
+        <Directory ${varDir}>
+          DirectoryIndex index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride None
+          Require all granted
+        </Directory>
+          ''
+      ];
+    };
+  };
+}
+
+