summaryrefslogtreecommitdiffstats
path: root/krebs/3modules
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-11-25 12:42:10 +0100
committerlassulus <git@lassul.us>2023-11-25 12:44:42 +0100
commit334378bc5730f7758a3e45346f6641b4464fc97d (patch)
tree43a58bfe5185f99b2738af44e0b92ba47c7f2726 /krebs/3modules
parent015ef28416289059a66b1df043a186256384cc7b (diff)
sync-containers3: bind to bridge after startup
Diffstat (limited to 'krebs/3modules')
-rw-r--r--krebs/3modules/sync-containers3.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/krebs/3modules/sync-containers3.nix b/krebs/3modules/sync-containers3.nix
index 7bec27b0f..58446c82b 100644
--- a/krebs/3modules/sync-containers3.nix
+++ b/krebs/3modules/sync-containers3.nix
@@ -246,9 +246,11 @@ in {
}; }
{ "container@${ctr.name}" = lib.mkIf ctr.runContainer {
serviceConfig = {
- ExecStop = pkgs.writers.writeDash "remove_interface" ''
- ${pkgs.iproute2}/bin/ip link del vb-${ctr.name}
- '';
+ ExecStartPost = [
+ (pkgs.writers.writeDash "bind-to-bridge" ''
+ ${pkgs.iproute2}/bin/ip link set "vb-$INSTANCE" master ctr0
+ '')
+ ];
};
}; }
]) (lib.attrValues cfg.containers)));