mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-18 00:08:54 +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;
|
defaultPackage = packages.youmubot;
|
||||||
|
|
||||||
|
overlays.default = final: prev: {
|
||||||
|
youmubot = final.callPackage ./package.nix {
|
||||||
|
naersk = final.callPackage inputs.naersk { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# `nix run`
|
# `nix run`
|
||||||
apps.youmubot = flake-utils.lib.mkApp {
|
apps.youmubot = flake-utils.lib.mkApp {
|
||||||
drv = packages.youmubot;
|
drv = packages.youmubot;
|
||||||
|
|
|
@ -7,6 +7,10 @@ in
|
||||||
{
|
{
|
||||||
options.services.youmubot = {
|
options.services.youmubot = {
|
||||||
enable = mkEnableOption "Enable youmubot, the discord bot made with Rust.";
|
enable = mkEnableOption "Enable youmubot, the discord bot made with Rust.";
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = youmubot;
|
||||||
|
};
|
||||||
|
|
||||||
envFile = mkOption {
|
envFile = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
|
@ -35,7 +39,7 @@ in
|
||||||
description = "the discord bot made with Rust";
|
description = "the discord bot made with Rust";
|
||||||
documentation = [ "https://github.com/natsukagami/youmubot" ];
|
documentation = [ "https://github.com/natsukagami/youmubot" ];
|
||||||
|
|
||||||
script = "${youmubot}/bin/youmubot";
|
script = "${cfg.package}/bin/youmubot";
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
DBPATH = cfg.databasePath;
|
DBPATH = cfg.databasePath;
|
||||||
|
|
Loading…
Add table
Reference in a new issue