nixos-configs/configurations/nos/modules/docker/music/jbots/compose.nix
matt1432 f481168458
All checks were successful
Discord / discord commits (push) Has been skipped
refactor(docker): share more vars between compose.nix files
2025-02-15 12:16:15 -05:00

41 lines
844 B
Nix

{configPath, ...}: {
pkgs,
self,
...
}: let
inherit (self.packages.${pkgs.system}) jmusicbot;
rwPath = configPath + "/music/jbots";
image = pkgs.callPackage ./images/jmusicbot.nix {inherit pkgs jmusicbot;};
in {
virtualisation.docker.compose."jbots" = {
networks.proxy_net = {external = true;};
services = {
"musicbot_be" = {
container_name = "be";
restart = "always";
inherit image;
volumes = [
"${rwPath}/be:/jmb/config:rw"
];
networks = ["proxy_net"];
};
"musicbot_br" = {
container_name = "br";
restart = "always";
inherit image;
volumes = [
"${rwPath}/br:/jmb/config:rw"
];
networks = ["proxy_net"];
};
};
};
# For accurate stack trace
_file = ./compose.nix;
}