From 1db852084066e1d26ea22015fb8a21a1737c9de9 Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 31 Aug 2021 23:33:50 +0200 Subject: [PATCH] Add JMusicBot Signed-off-by: Magic_RB --- containers/jmusicbot.nix | 25 +++++++++++++++++++++++++ flake.lock | 6 +++--- flake.nix | 1 + 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 containers/jmusicbot.nix diff --git a/containers/jmusicbot.nix b/containers/jmusicbot.nix new file mode 100644 index 0000000..9a019c1 --- /dev/null +++ b/containers/jmusicbot.nix @@ -0,0 +1,25 @@ +nglib: +(nglib "x86_64-linux").makeSystem { + system = "x86_64-linux"; + name = "nixng-jmusicbot"; + config = ({ pkgs, config, nglib, ... }: + { + dumb-init = { + enable = true; + type.services = {}; + }; + init.services.jmusicbot = { + shutdownOnExit = true; + }; + + services.jmusicbot = { + enable = true; + + config = { + prefix = "sudo"; + token = "\${BOT_TOKEN}"; + owner = "\${BOT_OWNER}"; + }; + }; + }); +} diff --git a/flake.lock b/flake.lock index f7293ca..40721a9 100644 --- a/flake.lock +++ b/flake.lock @@ -55,11 +55,11 @@ ] }, "locked": { - "lastModified": 1629067771, - "narHash": "sha256-p7o6Zem9r3KLTHgJ+zZTWG2e7JrLiLT3jsdpv4T8IAA=", + "lastModified": 1630445254, + "narHash": "sha256-+BnHazNZ+jVAY4AQI5784kkFidMxfiGatY3ZH9gjkQM=", "owner": "MagicRB", "repo": "NixNG", - "rev": "36e5192db7de929474edde479f9f7ea6230a855e", + "rev": "0f2e6e88f26ff31429f17b96b53d6e80b8280d70", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7ac342b..fc6c4b4 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ hydraPostgresql = (import ./containers/hydra.nix nixng.lib).postgresql; ingress = (import ./containers/ingress.nix nixng.lib); website = (import ./containers/website.nix inputs.website.website nixng.lib); + jmusicbot = (import ./containers/jmusicbot.nix nixng.lib); }; in {