Revert #178290: nixos/virtualisation: add option

...for explicitly named network interfaces

This reverts commit 6ae3e7695e.
(and evaluation fixups 08d26bbb72 7aed90a969)
Some of the tests fail or time out after the merge.
This commit is contained in:
Vladimír Čunát
2023-01-30 08:02:52 +01:00
committed by Cole Helbling
parent a92f046faf
commit 23ce77d76e
6 changed files with 92 additions and 131 deletions

View File

@@ -545,8 +545,7 @@ in
virtualisation.vlans =
mkOption {
type = types.listOf types.ints.unsigned;
default = if config.virtualisation.interfaces == {} then [ 1 ] else [ ];
defaultText = lib.literalExpression ''if config.virtualisation.interfaces == {} then [ 1 ] else [ ]'';
default = [ 1 ];
example = [ 1 2 ];
description =
lib.mdDoc ''
@@ -561,35 +560,6 @@ in
'';
};
virtualisation.interfaces = mkOption {
default = {};
example = {
enp1s0.vlan = 1;
};
description = lib.mdDoc ''
Network interfaces to add to the VM.
'';
type = with types; attrsOf (submodule {
options = {
vlan = mkOption {
type = types.ints.unsigned;
description = lib.mdDoc ''
VLAN to which the network interface is connected.
'';
};
assignIP = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Automatically assign an IP address to the network interface using the same scheme as
virtualisation.vlans.
'';
};
};
});
};
virtualisation.writableStore =
mkOption {
type = types.bool;