mini-2024-12-26-14-02-54
This commit is contained in:
25
configs/libvirtd.nix
Normal file
25
configs/libvirtd.nix
Normal file
@ -0,0 +1,25 @@
|
||||
{pkgs, ...}: {
|
||||
users.extraGroups.libvirtd.members = ["alex"];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
# Used for UEFI boot of Home Assistant OS guest image
|
||||
qemu.ovmf.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
# For virt-install
|
||||
virt-manager
|
||||
# For lsusb
|
||||
usbutils
|
||||
];
|
||||
persistence."/persist" = {
|
||||
directories = [
|
||||
"/var/lib/libvirt"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -8,8 +8,9 @@
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../configs/borg.nix
|
||||
../../configs/docker.nix
|
||||
../../configs/common-linux.nix
|
||||
../../configs/docker.nix
|
||||
../../configs/libvirtd.nix
|
||||
../../configs/user.nix
|
||||
];
|
||||
|
||||
@ -51,8 +52,12 @@
|
||||
useDHCP = false;
|
||||
firewall = {enable = false;};
|
||||
interfaces = {
|
||||
enp3s0.useDHCP = true;
|
||||
br0 = {
|
||||
useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
bridges.br0.interfaces = ["enp3s0"];
|
||||
|
||||
nftables.enable = true;
|
||||
};
|
||||
|
Reference in New Issue
Block a user