From 08ddd8a5fcbd4f0cc872304035e54a21fbcbb321 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 29 Jun 2022 16:00:39 +0200 Subject: [PATCH] nixos-generate-config: detect parallels virtualization --- nixos/modules/installer/tools/nixos-generate-config.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 1935d8252607..0e6320e4695c 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -300,6 +300,12 @@ if ($virt eq "oracle") { push @attrs, "virtualisation.virtualbox.guest.enable = true;" } +# Check if we're a Parallels guest. If so, enable the guest additions. +# It is blocked by https://github.com/systemd/systemd/pull/23859 +if ($virt eq "parallels") { + push @attrs, "hardware.parallels.enable = true;"; + push @attrs, "nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ \"prl-tools\" ];"; +} # Likewise for QEMU. if ($virt eq "qemu" || $virt eq "kvm" || $virt eq "bochs") {