nixos-configs/configurations/nos/modules/docker/music/jbots/compose.nix

42 lines
835 B
Nix
Raw Normal View History

rwDataDir: {
2024-07-24 15:49:31 -04:00
pkgs,
2025-01-25 11:41:14 -05:00
self,
2024-07-24 15:49:31 -04:00
...
}: let
2025-01-25 11:41:14 -05:00
inherit (self.packages.${pkgs.system}) jmusicbot;
rwPath = rwDataDir + "/music/jbots";
image = pkgs.callPackage ./images/jmusicbot.nix {inherit pkgs jmusicbot;};
in {
virtualisation.docker.compose."jbots" = {
networks.proxy_net = {external = true;};
2024-01-14 02:33:12 -05:00
services = {
"musicbot_be" = {
container_name = "be";
restart = "always";
2025-01-25 11:41:14 -05:00
inherit image;
volumes = [
"${rwPath}/be:/jmb/config:rw"
];
networks = ["proxy_net"];
};
2024-01-14 02:33:12 -05:00
"musicbot_br" = {
container_name = "br";
restart = "always";
2025-01-25 11:41:14 -05:00
inherit image;
2024-01-14 02:33:12 -05:00
volumes = [
"${rwPath}/br:/jmb/config:rw"
];
networks = ["proxy_net"];
};
2024-01-14 02:33:12 -05:00
};
};
# For accurate stack trace
_file = ./compose.nix;
2024-01-14 02:33:12 -05:00
}