]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/denise/production.nix
Add Denise websites
[perso/Immae/Config/Nix.git] / modules / private / websites / denise / production.nix
diff --git a/modules/private/websites/denise/production.nix b/modules/private/websites/denise/production.nix
new file mode 100644 (file)
index 0000000..9b28e9e
--- /dev/null
@@ -0,0 +1,25 @@
+{ lib, config, pkgs, ... }:
+let
+  cfg = config.myServices.websites.denise.production;
+in {
+  options.myServices.websites.denise.production.enable = lib.mkEnableOption "enable Denise's website";
+
+  config = lib.mkIf cfg.enable {
+    services.websites.env.production.vhostConfs.denise_production = {
+      certName     = "denise";
+      addToCerts   = true;
+      hosts        = [ "syanni.eu" "www.syanni.eu" ];
+      root         = ../_www;
+      extraConfig  = [
+        ''
+        <Directory ${../_www}>
+          DirectoryIndex index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride AuthConfig
+          Require all granted
+        </Directory>
+          ''
+      ];
+    };
+  };
+}