From b6ce980d0ddb4fe793a1d42f069bc54353c1f729 Mon Sep 17 00:00:00 2001 From: materus Date: Wed, 3 Apr 2024 17:54:07 +0200 Subject: [PATCH] valkyrie: change muse bot to evobot --- .../host/valkyrie/services/dcbot.nix | 38 +++++++++++++++++ .../host/valkyrie/services/default.nix | 4 +- .../host/valkyrie/services/muse.nix | 41 ------------------- 3 files changed, 40 insertions(+), 43 deletions(-) create mode 100644 configurations/host/valkyrie/services/dcbot.nix delete mode 100644 configurations/host/valkyrie/services/muse.nix diff --git a/configurations/host/valkyrie/services/dcbot.nix b/configurations/host/valkyrie/services/dcbot.nix new file mode 100644 index 0000000..949b177 --- /dev/null +++ b/configurations/host/valkyrie/services/dcbot.nix @@ -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 + ]; + }; + + }; + + +} diff --git a/configurations/host/valkyrie/services/default.nix b/configurations/host/valkyrie/services/default.nix index 94353e8..1eda642 100644 --- a/configurations/host/valkyrie/services/default.nix +++ b/configurations/host/valkyrie/services/default.nix @@ -4,12 +4,12 @@ [ ./pleroma.nix ./pihole.nix - ./muse.nix + ./dcbot.nix ]; services.adguardhome.enable = true; valkyrieService.pihole.enable = false; valkyrieService.pleroma.enable = true; - valkyrieService.muse.enable = true; + valkyrieService.dcbot.enable = true; } diff --git a/configurations/host/valkyrie/services/muse.nix b/configurations/host/valkyrie/services/muse.nix deleted file mode 100644 index f699dd5..0000000 --- a/configurations/host/valkyrie/services/muse.nix +++ /dev/null @@ -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 - ]; - }; - - }; - - -}