Skip to content

Commit 472227c

Browse files
committed
nixos-modules/host/options: retire microvm.host.tapScript
1 parent 84ac225 commit 472227c

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

doc/src/interfaces.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ with more than one CPU core.
4545
When running MicroVMs through the `host` module, the tap network
4646
interfaces are created through a systemd service dependency.
4747

48+
Extend the generated script in the guest configuration like this:
49+
50+
```nix
51+
microvm.binScripts.tap-up = lib.mkAfter ''
52+
${lib.getExe' pkgs.iproute2 "ip"} link set dev 'vm-ixp-as11201p' master 'ixp-peering'
53+
'';
54+
```
55+
4856
## `type = "macvtap"`
4957

5058
*MACVTAP* interfaces attach to a host's physical network interface,

lib/runner.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
let
77
inherit (pkgs) lib;
88

9-
inherit (microvmConfig) hostName virtiofsdScripts tapScripts macvtapScripts;
9+
inherit (microvmConfig) hostName virtiofsdScripts;
1010

1111
inherit (import ./. { inherit lib; }) createVolumesScript makeMacvtap;
1212
inherit (makeMacvtap {

nixos-modules/host/options.nix

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,6 @@
2222
'';
2323
};
2424

25-
host.tapScript = mkOption {
26-
description = ''
27-
Commands to run after creating a tap interface
28-
29-
Defaults to bring the interface up.
30-
31-
If you do not want the interface to be automatically created
32-
at all, just set
33-
`systemd.services."microvm-tap-interfaces@%i.service".enable = false`
34-
'';
35-
example = lib.literalExpression ''
36-
# Attach tap interface to bridge br0, and bring it up
37-
"${pkgs.iproute2}/bin/ip link set \"$id\" master br0 up"
38-
'';
39-
type = types.lines;
40-
default = ''
41-
${pkgs.iproute2}/bin/ip link set "$id" up
42-
'';
43-
defaultText = ''
44-
${pkgs.iproute2}/bin/ip link set "$id" up
45-
'';
46-
};
47-
4825
vms = mkOption {
4926
type = with types; attrsOf (submodule ({ config, name, ... }: {
5027
options = {

0 commit comments

Comments
 (0)