mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
Add macvlan support for declarative containers
This commit is contained in:
parent
42a0fc4387
commit
4889c271ca
2 changed files with 94 additions and 0 deletions
|
@ -476,6 +476,17 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
macvlans = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
example = [ "eth1" "eth2" ];
|
||||
description = ''
|
||||
The list of host interfaces from which macvlans will be
|
||||
created. For each interface specified, a macvlan interface
|
||||
will be created and moved to the container.
|
||||
'';
|
||||
};
|
||||
|
||||
extraVeths = mkOption {
|
||||
type = with types; attrsOf (submodule { options = networkOptions; });
|
||||
default = {};
|
||||
|
@ -654,6 +665,7 @@ in
|
|||
''}
|
||||
''}
|
||||
INTERFACES="${toString cfg.interfaces}"
|
||||
MACVLANS="${toString cfg.macvlans}"
|
||||
${optionalString cfg.autoStart ''
|
||||
AUTO_START=1
|
||||
''}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue