Allow customizing the package in the module

This commit is contained in:
Natsu Kagami 2023-06-20 01:16:08 +02:00
parent 26b0e3b21d
commit 7434f7bc64
Signed by: nki
GPG key ID: 55A032EB38B49ADB
2 changed files with 11 additions and 1 deletions

View file

@ -7,6 +7,10 @@ in
{
options.services.youmubot = {
enable = mkEnableOption "Enable youmubot, the discord bot made with Rust.";
package = mkOption {
type = types.package;
default = youmubot;
};
envFile = mkOption {
type = types.path;
@ -35,7 +39,7 @@ in
description = "the discord bot made with Rust";
documentation = [ "https://github.com/natsukagami/youmubot" ];
script = "${youmubot}/bin/youmubot";
script = "${cfg.package}/bin/youmubot";
environment = {
DBPATH = cfg.databasePath;