mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-01-04 23:50:43 -06:00
cleanup changes
This commit is contained in:
parent
d7f3c7de3c
commit
a3b4ea2046
1 changed files with 16 additions and 18 deletions
|
@ -15,25 +15,19 @@ let
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
win-desktop = pkgs.stdenvNoCC.mkDerivation rec {
|
|
||||||
name = "win11-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 {
|
windows10Logo = pkgs.fetchurl {
|
||||||
name = "win11-vm";
|
url = "https://upload.wikimedia.org/wikipedia/commons/c/c7/Windows_logo_-_2012.png";
|
||||||
# exec = "VBoxManage startvm win10";
|
hash = "sha256-uVNgGUo0NZN+mUmvMzyk0HKnhx64uqT4YWGSdeBz3T4=";
|
||||||
exec = "${pkgs.libvirt}/bin/virsh start win11 && ${pkgs.virt-viewer}/bin/virt-viewer --wait -c qemu:///system win11 && ${pkgs.libvirt}/bin/virsh shutdown win11";
|
};
|
||||||
icon = "${windows10Logo}";
|
|
||||||
desktopName = "Windows 11 VM";
|
windows-desktopItem = pkgs.makeDesktopItem {
|
||||||
};
|
name = "win11-vm";
|
||||||
installPhase = ''
|
exec = ''
|
||||||
install -Dm0644 {${desktopItem},$out}/share/applications/win11vm.desktop
|
${pkgs.bash}/bin/sh -c "${pkgs.libvirt}/bin/virsh start win11 && ${pkgs.virt-viewer}/bin/virt-viewer --wait -c qemu:///system win11 && ${pkgs.libvirt}/bin/virsh shutdown win11"
|
||||||
'';
|
'';
|
||||||
|
icon = "${windows10Logo}";
|
||||||
|
desktopName = "Windows 11 VM";
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -67,5 +61,9 @@ in
|
||||||
extraGroups = [ "libvirtd" ];
|
extraGroups = [ "libvirtd" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ win-desktop ];
|
environment.systemPackages = [
|
||||||
|
(pkgs.runCommand "windows-vm-desktop-item" { } ''
|
||||||
|
install -Dm444 -t $out/share/applications ${windows-desktopItem}/share/applications/*.desktop
|
||||||
|
'')
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue