mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-10 04:30:29 +00:00
Allow customizing the package in the module
This commit is contained in:
parent
26b0e3b21d
commit
7434f7bc64
2 changed files with 11 additions and 1 deletions
|
@ -21,6 +21,12 @@
|
|||
|
||||
defaultPackage = packages.youmubot;
|
||||
|
||||
overlays.default = final: prev: {
|
||||
youmubot = final.callPackage ./package.nix {
|
||||
naersk = final.callPackage inputs.naersk { };
|
||||
};
|
||||
};
|
||||
|
||||
# `nix run`
|
||||
apps.youmubot = flake-utils.lib.mkApp {
|
||||
drv = packages.youmubot;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue