feat: add backup for server

This commit is contained in:
danny 2025-09-28 12:37:26 +08:00
parent 20ee47caa2
commit f7409e0537
14 changed files with 256 additions and 165 deletions

View file

@ -1,42 +1,16 @@
{
pkgs,
config,
username,
...
}:
{
programs.virt-manager.enable = true;
users.groups.libvirtd.members = [ username ];
virtualisation = {
docker.enable = true;
# Run container as systemd service
oci-containers = {
backend = "docker";
backend = "podman";
containers = { };
};
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
ovmf.enable = true;
ovmf.packages = [ pkgs.OVMFFull.fd ];
};
};
spiceUSBRedirection.enable = true;
};
environment.etc = {
"ovmf/edk2-x86_64-secure-code.fd" = {
source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-x86_64-secure-code.fd";
};
"ovmf/edk2-i386-vars.fd" = {
source = config.virtualisation.libvirtd.qemu.package + "/share/qemu/edk2-i386-vars.fd";
};
};
}