]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/chloe.nix
Start moving websites to their own modules: certificates
[perso/Immae/Config/Nix.git] / virtual / modules / websites / chloe.nix
diff --git a/virtual/modules/websites/chloe.nix b/virtual/modules/websites/chloe.nix
new file mode 100644 (file)
index 0000000..2c0c65d
--- /dev/null
@@ -0,0 +1,27 @@
+{ lib, pkgs, config, mylibs, ... }:
+let
+    cfg = config.services.myWebsites.Chloe;
+in {
+  options.services.myWebsites.Chloe = {
+    production = {
+      enable = lib.mkEnableOption "enable Chloe's website in production";
+    };
+    integration = {
+      enable = lib.mkEnableOption "enable Chloe's website in integration";
+    };
+  };
+
+  config = lib.mkMerge [
+    (lib.mkIf cfg.production.enable {
+      security.acme.certs."chloe" = config.services.myCertificates.certConfig // {
+        domain = "osteopathe-cc.fr";
+        extraDomains = {
+          "www.osteopathe-cc.fr" = null;
+        };
+      };
+    })
+    (lib.mkIf cfg.integration.enable {
+      security.acme.certs."eldiron".extraDomains."chloe.immae.eu" = null;
+    })
+  ];
+}