3
0
Fork 0
forked from mirrors/nixpkgs

nixos-generate-config: detect parallels virtualization

This commit is contained in:
Kirill A. Korinsky 2022-06-29 16:00:39 +02:00
parent 020c74014b
commit 08ddd8a5fc
No known key found for this signature in database
GPG key ID: 98D8D9867759226E

View file

@ -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") {