aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/ressourcerie_banon/cloud.nix
blob: 51792182ab3c213959c359984c3058cea7a9612c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ lib, pkgs, config,  ... }:
let
  cfg = config.myServices.websites.ressourcerie_banon.cloud;
  nextcloud = config.myServices.tools.cloud.farm.package;
in {
  options.myServices.websites.ressourcerie_banon.cloud.enable = lib.mkEnableOption "enable Ressourcerie Banon’s cloud";

  config = lib.mkIf cfg.enable {
    myServices.tools.cloud.farm.instances = [ "ressourcerie_banon" ];
    services.websites.env.production.modules = [ "proxy_fcgi" ];
    services.websites.env.production.vhostConfs.ressourcerie_banon_cloud = {
      certName     = "ressourcerie_banon";
      addToCerts   = true;
      hosts        = ["cloud.le-garage-autonome.org"];
      root         = nextcloud;
      extraConfig  = [ config.myServices.tools.cloud.farm.vhosts.ressourcerie_banon ];
    };
  };
}