mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-01-02 22:20:44 -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 {
|
||||
name = "win11-vm";
|
||||
# exec = "VBoxManage startvm win10";
|
||||
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";
|
||||
};
|
||||
installPhase = ''
|
||||
install -Dm0644 {${desktopItem},$out}/share/applications/win11vm.desktop
|
||||
windows10Logo = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/c/c7/Windows_logo_-_2012.png";
|
||||
hash = "sha256-uVNgGUo0NZN+mUmvMzyk0HKnhx64uqT4YWGSdeBz3T4=";
|
||||
};
|
||||
|
||||
windows-desktopItem = pkgs.makeDesktopItem {
|
||||
name = "win11-vm";
|
||||
exec = ''
|
||||
${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
|
||||
|
@ -67,5 +61,9 @@ in
|
|||
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