From bcc401f81258c9d199283396bac0281f754a6f14 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 4 Jun 2024 15:56:05 -0500 Subject: [PATCH] fixup the win10 desktop file --- modules/virtualization/docker.nix | 2 +- modules/virtualization/virtualbox.nix | 36 ++++++++++++++++++--------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/modules/virtualization/docker.nix b/modules/virtualization/docker.nix index 1ccf48c..95c13b3 100644 --- a/modules/virtualization/docker.nix +++ b/modules/virtualization/docker.nix @@ -6,5 +6,5 @@ }: mkOizysModule config "docker" { virtualisation.docker.enable = true; - environment.systemPackages = with pkgs; [ lazydocker]; + environment.systemPackages = with pkgs; [ lazydocker ]; } diff --git a/modules/virtualization/virtualbox.nix b/modules/virtualization/virtualbox.nix index ba08eba..473aafb 100644 --- a/modules/virtualization/virtualbox.nix +++ b/modules/virtualization/virtualbox.nix @@ -1,18 +1,30 @@ -{ config, mkOizysModule, pkgs,... }: +{ + config, + mkOizysModule, + pkgs, + ... +}: let -# TODO: polish this up - win10vm = pkgs.stdenvNoCC.mkDerivation { - name = "win10vm"; - unpackPhase = "true"; - buildPhase = "mkdir $out"; - version = "unstable"; - desktopItem = pkgs.makeDesktopItem { + + win10vm = pkgs.stdenvNoCC.mkDerivation rec { name = "win10vm"; - exec = "VBoxManage startvm win10"; - # icon = ""; # TODO: add windows icon - desktopName = "Windows 10 VM"; + 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 + ''; }; -}; in mkOizysModule config "vbox" { virtualisation.virtualbox = {