aboutsummaryrefslogtreecommitdiff
path: root/virtual/modules/websites/chloe.nix
blob: 2c0c65ddb611c9ac15fdeb296a3fc6f2641224f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
    })
  ];
}