oizys/modules/virtualization/virtualbox.nix

36 lines
866 B
Nix
Raw Normal View History

2024-06-04 15:56:05 -05:00
{
config,
mkOizysModule,
pkgs,
...
}:
2024-06-03 10:30:27 -05:00
let
2024-06-04 15:56:05 -05:00
win10vm = pkgs.stdenvNoCC.mkDerivation rec {
2024-06-03 10:30:27 -05:00
name = "win10vm";
2024-06-04 15:56:05 -05:00
unpackPhase = "true";
version = "unstable";
windows10Logo = pkgs.fetchurl {
url = "https://upload.wikimedia.org/wikipedia/commons/c/c7/Windows_logo_-_2012.png";
hash = "sha256-uVNgGUo0NZN+mUmvMzyk0HKnhx64uqT4YWGSdeBz3T4=";
};
desktopItem = pkgs.makeDesktopItem {
name = "win10vm";
exec = "VBoxManage startvm win10";
icon = "${windows10Logo}";
desktopName = "Windows 10 VM";
};
installPhase = ''
install -Dm0644 {${desktopItem},$out}/share/applications/win10vm.desktop
'';
2024-06-03 10:30:27 -05:00
};
in
2024-03-21 15:59:10 -05:00
mkOizysModule config "vbox" {
virtualisation.virtualbox = {
host.enable = true;
};
2024-05-06 14:32:00 -05:00
users.extraGroups.vboxusers.members = [ "daylin" ];
2024-06-03 10:30:27 -05:00
environment.systemPackages = [ win10vm ];
2024-03-21 15:59:10 -05:00
}