From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- systems/eldiron/websites/db/default.nix | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 systems/eldiron/websites/db/default.nix (limited to 'systems/eldiron/websites/db') diff --git a/systems/eldiron/websites/db/default.nix b/systems/eldiron/websites/db/default.nix new file mode 100644 index 0000000..339948f --- /dev/null +++ b/systems/eldiron/websites/db/default.nix @@ -0,0 +1,32 @@ +{ lib, pkgs, config, ... }: +let + 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.env.tools.modules = [ "proxy_fcgi" ]; + security.acme.certs.eldiron.extraDomainNames = [ "db-1.immae.eu" ]; + services.websites.env.tools.vhostConfs.db-1 = { + certName = "eldiron"; + hosts = ["db-1.immae.eu" ]; + root = null; + extraConfig = [ '' + Alias /adminer ${pkgs.webapps-adminer} + + DirectoryIndex index.php + + SetHandler "proxy:unix:${config.services.phpfpm.pools.adminer.socket}|fcgi://localhost" + + + Use LDAPConnect + Require ldap-group cn=users,cn=mysql,cn=pam,ou=services,dc=immae,dc=eu + Require ldap-group cn=users,cn=postgresql,cn=pam,ou=services,dc=immae,dc=eu + + '' + ]; + }; + }; +} -- cgit v1.2.3