change some libvirt settings
This commit is contained in:
parent
e648013fb8
commit
eced9da306
@ -49,10 +49,14 @@ with config.deviceSpecific; {
|
|||||||
qemu = {
|
qemu = {
|
||||||
ovmf.enable = true;
|
ovmf.enable = true;
|
||||||
ovmf.packages = [
|
ovmf.packages = [
|
||||||
pkgs.OVMFFull.fd
|
(pkgs.OVMFFull.override {
|
||||||
|
secureBoot = true;
|
||||||
|
tpmSupport = true;
|
||||||
|
}).fd
|
||||||
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
|
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
|
||||||
];
|
];
|
||||||
runAsRoot = false;
|
runAsRoot = false;
|
||||||
|
swtpm.enable = true;
|
||||||
};
|
};
|
||||||
onBoot = "ignore";
|
onBoot = "ignore";
|
||||||
onShutdown = "shutdown";
|
onShutdown = "shutdown";
|
||||||
@ -61,6 +65,12 @@ with config.deviceSpecific; {
|
|||||||
spiceUSBRedirection.enable = true;
|
spiceUSBRedirection.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
users.users."qemu-libvirtd" = {
|
||||||
|
extraGroups =
|
||||||
|
lib.optionals (!config.virtualisation.libvirtd.qemu.runAsRoot)
|
||||||
|
[ "kvm" "input" ];
|
||||||
|
};
|
||||||
|
|
||||||
security.unprivilegedUsernsClone = true;
|
security.unprivilegedUsernsClone = true;
|
||||||
|
|
||||||
home-manager.users.${config.mainuser} = {
|
home-manager.users.${config.mainuser} = {
|
||||||
@ -68,6 +78,12 @@ with config.deviceSpecific; {
|
|||||||
[storage]
|
[storage]
|
||||||
driver = "overlay2"
|
driver = "overlay2"
|
||||||
'';
|
'';
|
||||||
|
home.file.".config/libvirt/libvirt.conf".text = ''
|
||||||
|
uri_default = "qemu:///system"
|
||||||
|
'';
|
||||||
|
home.packages = lib.mkIf (!isServer) [
|
||||||
|
pkgs.virt-manager
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# users.users.${config.mainuser} = {
|
# users.users.${config.mainuser} = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user