add support for setting up routing inside the netns

This commit is contained in:
Robin Appelman 2026-02-23 22:59:31 +01:00
commit 7588b5db00
18 changed files with 272 additions and 53 deletions

View file

@ -60,6 +60,22 @@ in {
default = [];
description = "devices to move into the namespace";
};
route = mkOption {
type = types.listOf (types.submodule ({config, ...}: {
options = {
device = mkOption {
type = types.str;
description = "device to route the traffic trough";
};
destination = mkOption {
type = types.str;
description = "What traffic to route. Either \"default\" or an ip range in CIDR notation";
};
};
}));
description = "routes to setup inside the namespace";
default = [];
};
};
}));
description = "namespaces to setup";