aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/tools/db/default.nix
blob: 361e204d8efd9af97055c61be0e499ac8e532db9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ lib, pkgs, config,  ... }:
let
    adminer = pkgs.callPackage ../../commons/adminer.nix {};

    cfg = config.myServices.websites.tools.db;
in {
  options.myServices.websites.tools.db = {
    enable = lib.mkEnableOption "enable database's website";
  };

  config = lib.mkIf cfg.enable {
    services.websites.tools.modules = adminer.apache.modules;
    services.websites.tools.vhostConfs.db-1 = {
      certName    = "eldiron";
      addToCerts  = true;
      hosts       = ["db-1.immae.eu" ];
      root        = null;
      extraConfig = [ adminer.apache.vhostConf ];
    };
  };
}