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 --- .../private/websites/isabelle/aten_integration.nix | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 modules/private/websites/isabelle/aten_integration.nix (limited to 'modules/private/websites/isabelle/aten_integration.nix') diff --git a/modules/private/websites/isabelle/aten_integration.nix b/modules/private/websites/isabelle/aten_integration.nix deleted file mode 100644 index c55ef92..0000000 --- a/modules/private/websites/isabelle/aten_integration.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ lib, pkgs, config, ... }: -let - secrets = config.myEnv.websites.isabelle.aten_integration; - webRoot = "/var/lib/ftp/immae/aten/public"; - cfg = config.myServices.websites.isabelle.aten_integration; - pcfg = config.services.phpApplication; -in { - options.myServices.websites.isabelle.aten_integration.enable = lib.mkEnableOption "enable Aten's website in integration"; - - config = lib.mkIf cfg.enable { - services.phpApplication.apps.isabelle_aten_integration = { - websiteEnv = "integration"; - httpdUser = config.services.httpd.Inte.user; - httpdGroup = config.services.httpd.Inte.group; - httpdWatchFiles = [ - config.secrets.fullPaths."websites/isabelle/aten_integration" - ]; - inherit webRoot; - varDir = "/var/lib/ftp/immae/aten_var"; - app = "/var/lib/ftp/immae/aten"; - serviceDeps = [ "postgresql.service" ]; - preStartActions = [ - "APP_ENV=dev ./bin/console --env=dev cache:clear --no-warmup" - ]; - phpOpenbasedir = [ "/tmp" ]; - phpPool = { - "php_admin_value[upload_max_filesize]" = "20M"; - "php_admin_value[post_max_size]" = "20M"; - #"php_admin_flag[log_errors]" = "on"; - "pm" = "ondemand"; - "pm.max_children" = "5"; - "pm.process_idle_timeout" = "60"; - }; - phpEnv = { - SYMFONY_DEBUG_MODE = "\"yes\""; - }; - phpPackage = pkgs.php72; - }; - - secrets.keys."websites/isabelle/aten_integration" = { - user = config.services.httpd.Inte.user; - group = config.services.httpd.Inte.group; - permissions = "0400"; - text = let - # cf: - # https://secure.php.net/manual/fr/function.parse-url.php - # vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php#parseDatabaseUrlQuery - psql_url = with secrets.postgresql; "pdo-pgsql://${user}:${password}@invalid:${port}/${database}?host=${socket}"; - in '' - SetEnv APP_ENV "dev" - SetEnv APP_SECRET "${secrets.secret}" - SetEnv DATABASE_URL "${psql_url}" - ''; - }; - services.websites.env.integration.vhostConfs.isabelle_aten_integration = { - certName = "integration"; - addToCerts = true; - hosts = [ "aten.ic.immae.dev" ]; - root = webRoot; - extraConfig = [ - '' - - SetHandler "proxy:unix:${pcfg.phpListenPaths.isabelle_aten_integration}|fcgi://localhost" - - - Include ${config.secrets.fullPaths."websites/isabelle/aten_integration"} - - - Use LDAPConnect - Require ldap-group cn=ic.immae.dev,cn=httpd,ou=services,dc=immae,dc=eu - ErrorDocument 401 "" - - - - Use LDAPConnect - Require ldap-group cn=ic.immae.dev,cn=httpd,ou=services,dc=immae,dc=eu - ErrorDocument 401 "" - - - - Options Indexes FollowSymLinks MultiViews Includes - AllowOverride All - Require all granted - DirectoryIndex index.php - FallbackResource /index.php - - '' - ]; - }; - }; -} -- cgit v1.2.3