Skip to content

Commit 61fb452

Browse files
Merge pull request #383 from SuperSandro2000/withDriveLetters-less-imports
Reduce imports of the same file
2 parents d9c9bd8 + 932473f commit 61fb452

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/runner.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ let
88

99
inherit (microvmConfig) hostName;
1010

11-
inherit (import ./. { inherit lib; }) createVolumesScript makeMacvtap;
11+
inherit (import ./. { inherit lib; }) createVolumesScript makeMacvtap withDriveLetters;
1212
inherit (makeMacvtap {
1313
inherit microvmConfig hypervisorConfig;
1414
}) openMacvtapFds macvtapFds;
1515

1616
hypervisorConfig = import (./runners + "/${microvmConfig.hypervisor}.nix") {
17-
inherit pkgs microvmConfig macvtapFds;
17+
inherit pkgs microvmConfig macvtapFds withDriveLetters;
1818
};
1919

2020
inherit (hypervisorConfig) command canShutdown shutdownCommand;

lib/runners/qemu.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ pkgs
22
, microvmConfig
33
, macvtapFds
4+
, withDriveLetters
45
}:
56

67
let
@@ -50,7 +51,6 @@ let
5051
inherit (microvmConfig) hostName vcpu mem balloon initialBalloonMem deflateOnOOM hotplugMem hotpluggedMem user interfaces shares socket forwardPorts devices vsock graphics storeOnDisk kernel initrdPath storeDisk;
5152
inherit (microvmConfig.qemu) machine extraArgs serialConsole;
5253

53-
inherit (import ../. { inherit (pkgs) lib; }) withDriveLetters;
5454

5555
volumes = withDriveLetters microvmConfig;
5656

lib/runners/stratovirt.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ pkgs
22
, microvmConfig
33
, macvtapFds
4+
, withDriveLetters
45
}:
56

67
let
@@ -14,7 +15,6 @@ let
1415

1516
tapMultiQueue = vcpu > 1;
1617

17-
inherit (import ../. { inherit (pkgs) lib; }) withDriveLetters;
1818
volumes = withDriveLetters microvmConfig;
1919

2020
# PCI required by vfio-pci for PCI passthrough

0 commit comments

Comments
 (0)