feat: bump up rust version and a big cleanup
Also added an example .env This will break stuff (briefly)
This commit is contained in:
parent
8ba92cc47e
commit
9452c0ac2e
7 changed files with 825 additions and 681 deletions
26
flake.nix
26
flake.nix
|
@ -75,8 +75,6 @@
|
|||
cfg = config.services."${package_name}";
|
||||
# secret options are in the env file(s) loaded separately
|
||||
environment_config = {
|
||||
LDAP_API = cfg.ldap;
|
||||
SKYNET_SERVER = cfg.discord.server;
|
||||
HOME = cfg.home;
|
||||
DATABASE = "database.db";
|
||||
};
|
||||
|
@ -97,7 +95,6 @@
|
|||
Group = "${cfg.user}";
|
||||
ExecStart = "${self.defaultPackage."${system}"}/bin/${script}";
|
||||
EnvironmentFile = [
|
||||
"${cfg.env.ldap}"
|
||||
"${cfg.env.discord}"
|
||||
"${cfg.env.mail}"
|
||||
"${cfg.env.wolves}"
|
||||
|
@ -133,13 +130,9 @@
|
|||
enable = mkEnableOption "enable ${package_name}";
|
||||
|
||||
env = {
|
||||
ldap = mkOption rec {
|
||||
type = types.str;
|
||||
description = "ENV file with LDAP_DISCORD_AUTH";
|
||||
};
|
||||
discord = mkOption rec {
|
||||
type = types.str;
|
||||
description = "ENV file with DISCORD_TOKEN, DISCORD_MINECRAFT";
|
||||
description = "ENV file with DISCORD_TOKEN, DISCORD_TOKEN_MINECRAFT";
|
||||
};
|
||||
mail = mkOption rec {
|
||||
type = types.str;
|
||||
|
@ -147,23 +140,10 @@
|
|||
};
|
||||
wolves = mkOption rec {
|
||||
type = types.str;
|
||||
description = "Mail details, has WOLVES_URL, WOLVES_KEY";
|
||||
description = "Mail details, has WOLVES_URL";
|
||||
};
|
||||
};
|
||||
|
||||
discord = {
|
||||
server = mkOption rec {
|
||||
type = types.str;
|
||||
description = "ID of the server the bot runs on";
|
||||
};
|
||||
};
|
||||
|
||||
ldap = mkOption rec {
|
||||
type = types.str;
|
||||
default = "https://api.account.skynet.ie";
|
||||
description = "Location of the ldap api";
|
||||
};
|
||||
|
||||
user = mkOption rec {
|
||||
type = types.str;
|
||||
default = "${package_name}";
|
||||
|
@ -211,14 +191,12 @@
|
|||
ExecStart = "${self.defaultPackage."${system}"}/bin/${package_name}";
|
||||
# can have multiple env files
|
||||
EnvironmentFile = [
|
||||
"${cfg.env.ldap}"
|
||||
"${cfg.env.discord}"
|
||||
"${cfg.env.mail}"
|
||||
"${cfg.env.wolves}"
|
||||
];
|
||||
};
|
||||
restartTriggers = [
|
||||
"${cfg.env.ldap}"
|
||||
"${cfg.env.discord}"
|
||||
"${cfg.env.mail}"
|
||||
"${cfg.env.wolves}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue