File tree Expand file tree Collapse file tree 2 files changed +20
-17
lines changed Expand file tree Collapse file tree 2 files changed +20
-17
lines changed Original file line number Diff line number Diff line change 32
32
at all, just set
33
33
`systemd.services."microvm-tap-interfaces@%i.service".enable = false`
34
34
'' ;
35
- example = ''
35
+ example = lib . literalExpression ''
36
36
# Attach tap interface to bridge br0, and bring it up
37
- '' ${pkgs.iproute2}/bin/ip link set "$id" master br0 up
37
+ " ${ pkgs . iproute2 } /bin/ip link set \ "$id\ " master br0 up"
38
38
'' ;
39
39
type = types . lines ;
40
40
default = ''
41
41
${ pkgs . iproute2 } /bin/ip link set "$id" up
42
42
'' ;
43
- defaultText = "''${ pkgs . iproute2 } /bin/ip link set \" $id\" up" ;
43
+ defaultText = ''
44
+ ${ pkgs . iproute2 } /bin/ip link set "$id" up
45
+ '' ;
44
46
} ;
45
47
46
48
vms = mkOption {
Original file line number Diff line number Diff line change 148
148
} ;
149
149
} ) ;
150
150
default = [ ] ;
151
- example = lib . literalExpression
152
- ''
151
+ example = lib . literalExpression /* nix */ ''
153
152
[ # forward local port 2222 -> 22, to ssh into the VM
154
153
{ from = "host"; host.port = 2222; guest.port = 22; }
155
154
159
158
host.address = "127.0.0.1"; host.port = 80;
160
159
}
161
160
]
162
- '' ;
161
+ '' ;
163
162
description =
164
163
''
165
164
When using the SLiRP user networking (default), this option allows to
319
318
devices = mkOption {
320
319
description = "PCI/USB devices that are passed from the host to the MicroVM" ;
321
320
default = [ ] ;
322
- example = literalExpression ''[ {
323
- bus = "pci";
324
- path = "0000:01:00.0";
325
- } {
326
- bus = "pci";
327
- path = "0000:01:01.0";
328
- } {
329
- # QEMU only
330
- bus = "usb";
331
- path = "vendorid=0xabcd,productid=0x0123";
332
- } ]'' ;
321
+ example = literalExpression /* nix */ ''
322
+ [ {
323
+ bus = "pci";
324
+ path = "0000:01:00.0";
325
+ } {
326
+ bus = "pci";
327
+ path = "0000:01:01.0";
328
+ } {
329
+ # QEMU only
330
+ bus = "usb";
331
+ path = "vendorid=0xabcd,productid=0x0123";
332
+ } ]
333
+ '' ;
333
334
type = with types ; listOf ( submodule {
334
335
options = {
335
336
bus = mkOption {
You can’t perform that action at this time.
0 commit comments