feat: update backend to share more info

This commit is contained in:
silver 2023-09-10 22:21:44 +01:00
parent 9d4575df27
commit 0ece2418ef

View file

@ -58,10 +58,6 @@
HOST_PORT = cfg.host_port; HOST_PORT = cfg.host_port;
SSH_ROOT = "skynet_old"; SSH_ROOT = "skynet_old";
# Email stuff
EMAIL_SMTP = cfg.mail.host;
EMAIL_USER = cfg.mail.user;
# special categories of users # special categories of users
USERS_ADMIN = lib.strings.concatStringsSep "," cfg.users.admin; USERS_ADMIN = lib.strings.concatStringsSep "," cfg.users.admin;
USERS_COMMITTEE = lib.strings.concatStringsSep "," cfg.users.committee; USERS_COMMITTEE = lib.strings.concatStringsSep "," cfg.users.committee;
@ -86,6 +82,7 @@
EnvironmentFile = [ EnvironmentFile = [
"${cfg.env.ldap}" "${cfg.env.ldap}"
"${cfg.env.discord}" "${cfg.env.discord}"
"${cfg.env.mail}"
]; ];
}; };
}); });
@ -120,37 +117,15 @@
env = { env = {
ldap = mkOption rec { ldap = mkOption rec {
type = types.str; type = types.str;
description = "Auth for the LDAP, has LDAP_ADMIN_PW"; description = "Auth for the LDAP, has LDAP_HOST, LDAP_ADMIN, LDAP_ADMIN_PW";
}; };
discord = mkOption rec { discord = mkOption rec {
type = types.str; type = types.str;
description = "Auth for the discord bot, has LDAP_DISCORD_AUTH"; description = "Auth for the discord bot, has LDAP_DISCORD_AUTH";
}; };
}; mail = mkOption rec {
ldap = {
host = mkOption rec {
type = types.str; type = types.str;
description = "LDAP Host"; description = "Mail details, has EMAIL_SMTP, EMAIL_USER, EMAIL_PASS";
};
admin = mkOption rec {
type = types.str;
description = "LDAP admin account dn";
};
};
mail = {
host = mkOption rec {
type = types.str;
default = "mail.skynet.ie";
description = "Email Host";
};
user = mkOption rec {
type = types.str;
default = "compsoc@skynet.ie";
description = "User for sending emails";
}; };
}; };
@ -235,6 +210,7 @@
EnvironmentFile = [ EnvironmentFile = [
"${cfg.env.ldap}" "${cfg.env.ldap}"
"${cfg.env.discord}" "${cfg.env.discord}"
"${cfg.env.mail}"
]; ];
}; };
}; };