more fixes
This commit is contained in:
parent
1a13656f95
commit
e0c6926ba0
4 changed files with 94 additions and 21 deletions
|
@ -18,9 +18,44 @@
|
|||
};
|
||||
};
|
||||
hooks.qemu = {
|
||||
end = "./scripts/end.sh";
|
||||
"win11" = ./scripts/vm-win11-hook.sh;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.libvirtd = {
|
||||
path = let
|
||||
env = pkgs.buildEnv {
|
||||
name = "qemu-hook-env";
|
||||
paths = with pkgs; [
|
||||
bash
|
||||
libvirt
|
||||
kmod
|
||||
systemd
|
||||
ripgrep
|
||||
sd
|
||||
];
|
||||
};
|
||||
in
|
||||
[ env ];
|
||||
|
||||
/*preStart =
|
||||
''
|
||||
mkdir -p /var/lib/libvirt/hooks
|
||||
mkdir -p /var/lib/libvirt/hooks/qemu.d/win10/prepare/begin
|
||||
mkdir -p /var/lib/libvirt/hooks/qemu.d/win10/release/end
|
||||
mkdir -p /var/lib/libvirt/vgabios
|
||||
|
||||
ln -sf /home/regent/symlinks/qemu /var/lib/libvirt/hooks/qemu
|
||||
ln -sf /home/regent/symlinks/kvm.conf /var/lib/libvirt/hooks/kvm.conf
|
||||
ln -sf /home/regent/symlinks/start.sh /var/lib/libvirt/hooks/qemu.d/win11/prepare/begin/start.sh
|
||||
ln -sf /home/regent/symlinks/stop.sh /var/lib/libvirt/hooks/qemu.d/win11/release/end/stop.sh
|
||||
|
||||
chmod +x /var/lib/libvirt/hooks/qemu
|
||||
chmod +x /var/lib/libvirt/hooks/kvm.conf
|
||||
chmod +x /var/lib/libvirt/hooks/qemu.d/win11/prepare/begin/start.sh
|
||||
chmod +x /var/lib/libvirt/hooks/qemu.d/win11/release/end/stop.sh
|
||||
'';*/
|
||||
};
|
||||
|
||||
users.extraUsers.regent.extraGroups = [ "libvirtd" ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue