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

                                   
                                                         







                                                            










                                                                      
{ lib, pkgs, config, mylibs, ... }:
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 {
    security.acme.certs."eldiron".extraDomains."db-1.immae.eu" = null;

    services.myWebsites.tools.modules = adminer.apache.modules;
    services.myWebsites.tools.vhostConfs.db-1 = {
      certName    = "eldiron";
      hosts       = ["db-1.immae.eu" ];
      root        = null;
      extraConfig = [ adminer.apache.vhostConf ];
    };
  };
}