mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/jmusicbot: add option services.jmusicbot.package
This commit is contained in:
parent
2858668837
commit
f28d9be832
1 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,13 @@ in
|
||||||
services.jmusicbot = {
|
services.jmusicbot = {
|
||||||
enable = mkEnableOption "jmusicbot, a Discord music bot that's easy to set up and run yourself";
|
enable = mkEnableOption "jmusicbot, a Discord music bot that's easy to set up and run yourself";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.jmusicbot;
|
||||||
|
defaultText = literalExpression "pkgs.jmusicbot";
|
||||||
|
description = "JMusicBot package to use";
|
||||||
|
};
|
||||||
|
|
||||||
stateDir = mkOption {
|
stateDir = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -27,7 +34,7 @@ in
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
description = "Discord music bot that's easy to set up and run yourself!";
|
description = "Discord music bot that's easy to set up and run yourself!";
|
||||||
serviceConfig = mkMerge [{
|
serviceConfig = mkMerge [{
|
||||||
ExecStart = "${pkgs.jmusicbot}/bin/JMusicBot";
|
ExecStart = "${cfg.package}/bin/JMusicBot";
|
||||||
WorkingDirectory = cfg.stateDir;
|
WorkingDirectory = cfg.stateDir;
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 20;
|
RestartSec = 20;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue