feat: added a route to return discord usernames.

Closes #19
This commit is contained in:
silver 2023-08-27 20:33:43 +01:00
parent ce471ad39a
commit 92fad0dc4b
8 changed files with 352 additions and 122 deletions

View file

@ -114,9 +114,15 @@
enable = mkEnableOption "enable ${package_name}";
# keep really secret stuff in this
envFile = mkOption rec {
type = types.str;
description = "The env file";
env = {
ldap = mkOption rec {
type = types.str;
description = "Auth for the LDAP, has LDAP_ADMIN_PW";
};
discord = mkOption rec {
type = types.str;
description = "Auth for the discord bot, has LDAP_DISCORD_AUTH";
};
};
ldap = {
@ -222,7 +228,11 @@
Group = "${cfg.user}";
Restart = "always";
ExecStart = "${self.defaultPackage."${system}"}/bin/${package_name}";
EnvironmentFile = "${cfg.envFile}";
# multiple files
EnvironmentFile = [
"${cfg.env.ldap}"
"${cfg.env.discord}"
];
};
};
} // serviceGenerator scripts;