swap desktop file to virt

This commit is contained in:
Daylin Morgan 2024-12-19 11:24:24 -06:00
parent 8b435e6eea
commit a811930cd2
Signed by: daylin
GPG key ID: 950D13E9719334AD
2 changed files with 42 additions and 21 deletions

View file

@ -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 ];
}

View file

@ -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 ];
}