diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2021-06-23 17:46:46 +0200 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2021-09-18 16:58:16 +0200 |
commit | b29c2f97c37f7cb4a1b3411ff9888a49873597d2 (patch) | |
tree | 7352ff4d0310afcb03cb1be6ad15745c28d3cd5f /nixos/lib/build-vms.nix | |
parent | b8bfc81d5b2d88b734a311f712fc0ba2b267f9e0 (diff) | |
download | nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar.gz nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar.bz2 nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar.lz nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar.xz nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.tar.zst nixlib-b29c2f97c37f7cb4a1b3411ff9888a49873597d2.zip |
nixos/lib/qemu-flags: rename to qemu-common
The current name is misleading: it doesn't contain cli arguments, but several constants and utility functions related to qemu. This commit also removes the use of `with import ...` for clarity.
Diffstat (limited to 'nixos/lib/build-vms.nix')
-rw-r--r-- | nixos/lib/build-vms.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index b009108e43f9..0f0bdb4a86cb 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -4,15 +4,14 @@ , # Ignored config ? null , # Nixpkgs, for qemu, lib and more - pkgs + pkgs, lib , # !!! See comment about args in lib/modules.nix specialArgs ? {} , # NixOS configuration to add to the VMs extraConfigurations ? [] }: -with pkgs.lib; -with import ../lib/qemu-flags.nix { inherit pkgs; }; +with lib; rec { @@ -93,8 +92,9 @@ rec { "${config.networking.hostName}\n")); virtualisation.qemu.options = - flip concatMap interfacesNumbered - ({ fst, snd }: qemuNICFlags snd fst m.snd); + let qemu-common = import ../lib/qemu-common.nix { inherit lib pkgs; }; + in flip concatMap interfacesNumbered + ({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd); }; } ) |