NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.39k stars 13.61k forks source link

Package request: vmware unlocker NixOS for configuration.nix #338728

Open abhillman opened 2 weeks ago

abhillman commented 2 weeks ago

~https://github.com/paolo-projects/unlocker~

Request is for there to be a NixOS option to enable unlocker. Also see https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/vmware-workstation/default.nix#L145. The nixos configuration is https://github.com/NixOS/nixpkgs/blob/nixos-24.05/nixos/modules/virtualisation/vmware-host.nix.

abhillman commented 2 weeks ago

Apologies -- I see this is actually already implemented https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/vmware-workstation/default.nix#L145. Nice work in https://github.com/NixOS/nixpkgs/pull/200664, @cawilliamson!

abhillman commented 2 weeks ago

Re-opening as a request for a NixOS option

abhillman commented 2 weeks ago

For the moment, I think this would be the way to do an overlay in configuration.nix:

{ config, pkgs, lib, ... }:
let
  sysVersion = "23.05";

  vmwareWorkstationOverlay = self: super: {
    vmware-workstation = super.vmware-workstation.override {
      enableMacOSGuests = true;
    };
  };
in
{
  nixpkgs.overlays = [ vmwareWorkstationOverlay ];
SuperSandro2000 commented 2 weeks ago

I think we don't need an extra option just to do this:

virtualisation.vmware.host.package = pkgs.vmware-workstation.override { enableMacOSGuests = true; };

This is probably turned off by default to not increase closure size.