diff options
| author | uakci <git@uakci.space> | 2024-08-19 00:48:52 +0200 |
|---|---|---|
| committer | uakci <git@uakci.space> | 2024-08-19 00:48:52 +0200 |
| commit | 586a27b1a27608a333b159eeb3ffa1600c650d20 (patch) | |
| tree | efd2740b797042270468dfd9e8d0480a82664278 /module.nix | |
| parent | tweak logic (bad code but am tired) (diff) | |
| download | nuogai-main.tar.gz nuogai-main.zip | |
Diffstat (limited to 'module.nix')
| -rw-r--r-- | module.nix | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -3,21 +3,22 @@ let cfg = config.services.nuogai; in with lib; { options.services.nuogai = { enable = mkEnableOption "Enables the nuogaı Discord Bot"; - toaduaHost = mkOption { type = types.str; }; + hostInternal = mkOption { type = types.str; }; + hostExternal = mkOption { type = types.str; }; zugaiHost = mkOption { type = types.str; }; tokenPath = mkOption { type = types.path; }; }; config = { fonts.fonts = optionals cfg.enable [ self.packages.${system}.toaqScript ]; - services.nuogai.zugaiHost = lib.mkDefault "https://zugai.toaq.me"; systemd.services.nuogai = { inherit (cfg) enable; description = "Toaq Discord bot"; wantedBy = [ "multi-user.target" ]; wants = [ "network-online.target" ]; - environment = { - TOADUA_HOST = cfg.toaduaHost; - ZUGAI_HOST = cfg.zugaiHost; + environment = with cfg; { + TOADUA_HOST_INTERNAL = hostInternal; + TOADUA_HOST_EXTERNAL = hostExternal; + ZUGAI_HOST = zugaiHost; }; script = '' export NUOGAI_TOKEN=$(cat ${cfg.tokenPath}) |
