aboutsummaryrefslogblamecommitdiff
path: root/nixops/modules/websites/tools/db.nix
blob: 7c15c23a2374c885135bc9cd46e01df176382f0f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                            
   
                                                         







                                                            

                                                             
                              
                         





                                                 
{ lib, pkgs, config,  ... }:
let
    adminer = pkgs.callPackage ../commons/adminer.nix {};

    cfg = config.services.myWebsites.tools.databases;
in {
  options.services.myWebsites.tools.databases = {
    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 ];
    };
  };
}