2024-12-12 14:41:43 +01:00
|
|
|
# SPDX-FileCopyrightText: 2024 Tom Hubrecht <tom.hubrecht@dgnum.eu>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: EUPL-1.2
|
|
|
|
|
2024-11-21 13:36:24 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
sources,
|
|
|
|
...
|
|
|
|
}:
|
2023-09-24 13:16:22 +02:00
|
|
|
|
2024-02-02 10:51:31 +01:00
|
|
|
let
|
|
|
|
host = "demarches.dgnum.eu";
|
2024-12-17 22:17:12 +01:00
|
|
|
port = 3000;
|
2024-11-21 13:36:24 +01:00
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
dgn-id = "8dfdc60d1aa66e7206461ed7a49199f624a66b4e";
|
|
|
|
patch = pkgs.fetchurl {
|
|
|
|
url = "https://git.dgnum.eu/DGNum/demarches-normaliennes/commit/${dgn-id}.patch";
|
|
|
|
hash = "sha256-6JdbUf2fc79E5F1wtYFnP1JLGJffhGbjaxysRFr8xN4=";
|
|
|
|
};
|
2024-02-02 10:51:31 +01:00
|
|
|
in
|
|
|
|
{
|
2023-09-24 13:16:22 +02:00
|
|
|
imports = [ ./module.nix ];
|
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
dgn-web.internalPorts.ds-fr = port;
|
2024-10-12 19:30:36 +02:00
|
|
|
|
2023-09-24 13:16:22 +02:00
|
|
|
services.demarches-simplifiees = {
|
|
|
|
enable = true;
|
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
package = (import sources.nix-pkgs { inherit pkgs; }).demarches-simplifiees.overrideAttrs (old: {
|
|
|
|
dsModules = old.dsModules.overrideAttrs {
|
|
|
|
prePatch = ''
|
|
|
|
${pkgs.lib.getExe pkgs.git} apply -p1 < ${patch}
|
|
|
|
'';
|
|
|
|
};
|
2023-09-24 13:16:22 +02:00
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
prePatch = ''
|
|
|
|
${pkgs.lib.getExe pkgs.git} apply -p1 < ${patch}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
rm -f lib/tasks/deployment/20240830192553_backfill_hide_instructeurs_email.rake
|
|
|
|
rm -f lib/tasks/deployment/20240912151317_clean_virtual_column_from_procedure_presentation.rake
|
|
|
|
rm -f lib/tasks/deployment/20240920130741_migrate_procedure_presentation_to_columns.rake
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
|
|
|
inherit host port;
|
2023-09-24 13:16:22 +02:00
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
environmentFile = config.age.secrets."ds-fr-secret_file".path;
|
2023-09-24 13:16:22 +02:00
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
initialDeploymentDate = "20230923";
|
|
|
|
|
|
|
|
environment = {
|
2023-09-26 20:46:38 +02:00
|
|
|
# Disable France Connect and Agent Connect
|
2023-09-24 13:16:22 +02:00
|
|
|
FRANCE_CONNECT_ENABLED = "disabled";
|
2023-09-26 20:46:38 +02:00
|
|
|
AGENT_CONNECT_ENABLED = "disabled";
|
2023-09-24 13:16:22 +02:00
|
|
|
|
|
|
|
# S3 storage setup
|
2023-09-26 20:46:38 +02:00
|
|
|
ACTIVE_STORAGE_SERVICE = "local";
|
2023-09-24 13:16:22 +02:00
|
|
|
|
|
|
|
# SAML_IDP_ENABLED = "enabled";
|
|
|
|
|
|
|
|
# Optional settings
|
|
|
|
APPLICATION_NAME = ''"Démarches normaliennes"'';
|
|
|
|
APPLICATION_SHORTNAME = "d-s.dgnum.eu";
|
|
|
|
APPLICATION_BASE_URL = "https://${host}";
|
|
|
|
|
|
|
|
# SMTP setup, TODO: Fix and stop using sendmail
|
|
|
|
CLASSIC_SMTP_ENABLED = "enabled";
|
|
|
|
SMTP_HOST = "kurisu.lahfa.xyz";
|
|
|
|
SMTP_PORT = "465";
|
|
|
|
SMTP_USER = "web-services@infra.dgnum.eu";
|
|
|
|
SMTP_TLS = "";
|
|
|
|
SMTP_SSL = "true";
|
|
|
|
SMTP_AUTHENTICATION = "plain";
|
|
|
|
|
|
|
|
SUPER_ADMIN_OTP_ENABLED = "disabled";
|
|
|
|
|
|
|
|
CONTACT_EMAIL = "demarches@infra.dgnum.eu";
|
|
|
|
EQUIPE_EMAIL = "equipe@infra.dgnum.eu";
|
|
|
|
TECH_EMAIL = "tech@infra.dgnum.eu";
|
2023-10-02 22:48:18 +02:00
|
|
|
NO_REPLY_EMAIL = ''"Ne pas répondre <demarches@infra.dgnum.eu>"'';
|
2023-09-24 13:16:22 +02:00
|
|
|
OLD_CONTACT_EMAIL = "";
|
|
|
|
CONTACT_PHONE = "";
|
|
|
|
|
2023-12-03 13:24:09 +01:00
|
|
|
STATUS_URL = "https://status.dgnum.eu/demarches-normaliennes";
|
|
|
|
|
2023-12-10 19:32:49 +01:00
|
|
|
DEMANDE_INSCRIPTION_ADMIN_PAGE_URL = "https://demarches.dgnum.eu/commencer/demande-d-inscription-demarches-normaliennes";
|
2023-12-10 20:24:21 +01:00
|
|
|
DOC_URL = "https://docs.dgnum.eu/s/demarches-normaliennes";
|
2023-12-10 19:32:49 +01:00
|
|
|
|
2023-12-13 14:40:20 +01:00
|
|
|
ADMINS_GROUP_ENABLED = "enabled";
|
|
|
|
|
2024-01-12 10:59:15 +01:00
|
|
|
RUBY_YJIT_ENABLE = "1";
|
|
|
|
|
2024-12-17 22:17:12 +01:00
|
|
|
STRICT_EMAIL_VALIDATION_STARTS_ON = "2024-12-18";
|
2023-09-24 13:16:22 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-18 07:57:05 +01:00
|
|
|
# dgn-backups.jobs.ds-fr.settings.paths = [ "/var/lib/private/demarches-simplifiees/" ];
|
2024-02-21 22:49:20 +01:00
|
|
|
dgn-backups.postgresDatabases = [ "ds-fr" ];
|
2023-09-24 13:16:22 +02:00
|
|
|
}
|