fixed the container dependancies

This commit is contained in:
2026-10-04 15:14:17 +01:00
parent 9b4ab1e722
commit e82337ba65

View File

@@ -1,5 +1,5 @@
{moduleWithSystem, ...}: { {moduleWithSystem, ...}: {
flake.nixosModules.containerMatrix = moduleWithSystem ({pkgs, ...}: {config, ...}: { flake.nixosModules.containerMatrix = moduleWithSystem ({pkgs, ...}: {
virtualisation.oci-containers.containers."matrix-mjolnir" = { virtualisation.oci-containers.containers."matrix-mjolnir" = {
image = "matrixdotorg/mjolnir:latest"; image = "matrixdotorg/mjolnir:latest";
volumes = [ volumes = [
@@ -39,9 +39,6 @@
ports = [ ports = [
"8008:8008/tcp" "8008:8008/tcp"
]; ];
dependsOn = [
"synapse-db"
];
log-driver = "journald"; log-driver = "journald";
extraOptions = [ extraOptions = [
"--network-alias=synapse" "--network-alias=synapse"
@@ -75,12 +72,17 @@
ExecStop = "podman network rm -f matrix_default"; ExecStop = "podman network rm -f matrix_default";
}; };
script = '' script = ''
podman network inspect matrix_default || podman network create matrix_default podman network inspect matrix_default || podman network create --ipv6=false matrix_default
''; '';
partOf = ["podman-compose-matrix-root.target"]; partOf = ["podman-compose-matrix-root.target"];
wantedBy = ["podman-compose-matrix-root.target"]; wantedBy = ["podman-compose-matrix-root.target"];
}; };
networking.firewall.allowedTCPPorts = [
22
8448
];
# Root service # Root service
# When started, this will automatically create all resources and start # When started, this will automatically create all resources and start
# the containers. When stopped, this will teardown all resources. # the containers. When stopped, this will teardown all resources.