valkyrie: change muse bot to evobot

This commit is contained in:
Mateusz Słodkowicz 2024-04-03 17:54:07 +02:00
parent 91c694193c
commit b6ce980d0d
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
3 changed files with 40 additions and 43 deletions

View File

@ -0,0 +1,38 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.valkyrieService.dcbot.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable dcbot";
config =
let
cfg = config.valkyrieService.dcbot;
in
lib.mkIf cfg.enable {
sops.templates."dcbot.env".content = ''
TOKEN=${config.sops.placeholder.discord-token}
MAX_PLAYLIST_SIZE=10
PRUNING=false
LOCALE=pl
DEFAULT_VOLUME=100
STAY_TIME=30
'';
systemd.tmpfiles.rules = [
"d /var/lib/muse 0776 root root -"
];
virtualisation.oci-containers.containers.muse = {
image = "eritislami/evobot:latest";
volumes = [
];
environmentFiles = [
config.sops.templates."dcbot.env".path
];
};
};
}

View File

@ -4,12 +4,12 @@
[ [
./pleroma.nix ./pleroma.nix
./pihole.nix ./pihole.nix
./muse.nix ./dcbot.nix
]; ];
services.adguardhome.enable = true; services.adguardhome.enable = true;
valkyrieService.pihole.enable = false; valkyrieService.pihole.enable = false;
valkyrieService.pleroma.enable = true; valkyrieService.pleroma.enable = true;
valkyrieService.muse.enable = true; valkyrieService.dcbot.enable = true;
} }

View File

@ -1,41 +0,0 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.valkyrieService.muse.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable muse bot";
config =
let
cfg = config.valkyrieService.muse;
in
lib.mkIf cfg.enable {
sops.templates."muse.env".content = ''
CACHE_LIMIT=512MB
BOT_STATUS=online
BOT_ACTIVITY_TYPE=LISTENING
BOT_ACTIVITY=Coś
DISCORD_TOKEN=${config.sops.placeholder.discord-token}
YOUTUBE_API_KEY=${config.sops.placeholder.youtube-api}
SPOTIFY_CLIENT_ID=${config.sops.placeholder.spotify-client-id}
SPOTIFY_CLIENT_SECRET=${config.sops.placeholder.spotify-client-secret}
'';
systemd.tmpfiles.rules = [
"d /var/lib/muse 0776 root root -"
];
virtualisation.oci-containers.containers.muse = {
image = "codetheweb/muse:latest";
volumes = [
"/var/lib/muse:/data"
];
environmentFiles = [
config.sops.templates."muse.env".path
];
};
};
}