Add muse bot to valkyrie

This commit is contained in:
Mateusz Słodkowicz 2024-03-22 20:12:00 +01:00
parent a76b42c3da
commit a66570226c
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
4 changed files with 54 additions and 5 deletions

View File

@ -11,7 +11,11 @@
sops.defaultSopsFile = materusCfg.hostPath + "/secrets/secrets.yaml";
sops.secrets.wireguard = { };
sops.secrets.discord-token = {};
sops.secrets.spotify-client-id = {};
sops.secrets.spotify-client-secret = {};
sops.secrets.youtube-api = {};
services.openssh.hostKeys = [
{
bits = 4096;

View File

@ -1,4 +1,8 @@
wireguard: ENC[AES256_GCM,data:i98U0ugxbNqWNuKR8u+mdWoSMLViHXfsWRBS1lvjb+hgGxveyzjBcagBIeY=,iv:/hF9oH2R6NSeHT/UQTlbmtx+gPX/3CJOLPNnxrzsY/g=,tag:2ub5w8uH2O1B2hoku8Kowg==,type:str]
discord-token: ENC[AES256_GCM,data:JQ/6MJvBlJpKzs/L0hFB1LPpQSfJvDdEB6YerVZyDqGo7plA0S5wORACgA88Dei1x1NGsXhYtiwT4vE9jjeCOlWXZdl1mA==,iv:BsDu1De0qLX/8VDiZ5co1q1LXxkz/Som9+hvm/67/xU=,tag:YO0wQNF3/AXbifpeAa935Q==,type:str]
spotify-client-id: ENC[AES256_GCM,data:WK7CJGw6mtIG3Jfp59cWx3ool4z1P09TvHcpbOQ2JV0=,iv:EaJ5ecXdmx0Ky+43xZITM811IOo4EisvPSyogXrJXng=,tag:NYTI4vLsWGa695CJ+TIgbw==,type:str]
spotify-client-secret: ENC[AES256_GCM,data:TnR+zLLklTfzMdR4woaZWuMVJQ9VIYsFM588GRO6WCY=,iv:cYiqw8ZdMgLeug4ptwPV3L+MeY6xIldfUBfiYg1mFD8=,tag:YDLh6BXFcBHnpdgM7e87wg==,type:str]
youtube-api: ENC[AES256_GCM,data:qmpFlFvudS9rXQfN+Th/UrPWCW0mg5GkpMucS/01AmOnlChqtojC,iv:q3bKwI2I6BNa3L9ezKCE1fWT/vZLiJ8uzug1z2z+TWA=,tag:gKG3HTz8jp2LAFh8e8O6sg==,type:str]
sops:
kms: []
gcp_kms: []
@ -14,8 +18,8 @@ sops:
d2dMUUh1RDB3UnpEdFJsNHpQRXFWemMKc41dlOapTsvH91QLNhdPbrzerPFakOiX
J/uoZDMIhsmQxgQM7Fqxr05NywhI/ZjOtJS2bayp73O57xjjMYcyNQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-03-21T22:56:14Z"
mac: ENC[AES256_GCM,data:bh6fCWIn4Ppv0NSa2qXPIi2O0VfRqZCUqcvPFttrh1Q1BISkBFrX5uz7Zq5OTE0HzUMDhHq2/uQGqKjao9qyDYhaP20Ffh2HbQGvIvOZLtyKzT12LVwBLxSAsJ9l6fF+sDLrT98f4vDiu/8dyRnhDAV4V9DUNbDi/gF4imjoyXQ=,iv:Xh+nK7DyogwUxMPO4qbZgL9XptOISH/qTRaml9HjWAw=,tag:gzZ4ZRd6LjvsN9Axd4aykQ==,type:str]
lastmodified: "2024-03-22T18:29:22Z"
mac: ENC[AES256_GCM,data:X4SJZ4A7YwQGGvdjf0/hKSn6HuiwKC0DaswzAgA+sqfXnwTAFt1FPhak//BxkRKBqw5A+FTyRf/a4FnY5XG+gu3RxO6+np4AJwvKiA0Hwa9QImwrh9A1k9URE9mtGegqtw3wnZBw4XXA+vhEUIq10sGaVuy6outfvlfNM/TMlgc=,iv:WENShl1jCAUQggvssZMS+6vEgc8l+wzZLHXRkoYAV8I=,tag:2y6ltpwxUIOlaUMoWDRcxg==,type:str]
pgp:
- created_at: "2024-03-21T22:55:36Z"
enc: |-

View File

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

View File

@ -0,0 +1,41 @@
{ config, pkgs, lib, materusArg, ... }:
{
options.valkyrieService.muse.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable pihole";
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
];
};
};
}