diff --git a/hosts/othalan/virt/default.nix b/hosts/othalan/virt/default.nix index a940532..760619e 100644 --- a/hosts/othalan/virt/default.nix +++ b/hosts/othalan/virt/default.nix @@ -15,6 +15,26 @@ let } ); }; + win-desktop = pkgs.stdenvNoCC.mkDerivation rec { + name = "win10vm"; + 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 { imports = [ @@ -45,4 +65,6 @@ in users.users.daylin = { extraGroups = [ "libvirtd" ]; }; + + environment.systemPackages = [ win-desktop ]; } diff --git a/modules/virtualization/virtualbox.nix b/modules/virtualization/virtualbox.nix index 473aafb..a8c4c78 100644 --- a/modules/virtualization/virtualbox.nix +++ b/modules/virtualization/virtualbox.nix @@ -1,35 +1,34 @@ { config, mkOizysModule, - pkgs, ... }: let + # win10vm = pkgs.stdenvNoCC.mkDerivation rec { + # name = "win10vm"; + # 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 + # ''; + # }; - win10vm = pkgs.stdenvNoCC.mkDerivation rec { - name = "win10vm"; - 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" { + # environment.systemPackages = [ win10vm ]; virtualisation.virtualbox = { host.enable = true; }; users.extraGroups.vboxusers.members = [ "daylin" ]; - environment.systemPackages = [ win10vm ]; }