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 = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../configs/borg.nix
|
../../configs/borg.nix
|
||||||
../../configs/docker.nix
|
|
||||||
../../configs/common-linux.nix
|
../../configs/common-linux.nix
|
||||||
|
../../configs/docker.nix
|
||||||
|
../../configs/libvirtd.nix
|
||||||
../../configs/user.nix
|
../../configs/user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -51,9 +52,13 @@
|
|||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
firewall = {enable = false;};
|
firewall = {enable = false;};
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp3s0.useDHCP = true;
|
br0 = {
|
||||||
|
useDHCP = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bridges.br0.interfaces = ["enp3s0"];
|
||||||
|
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -96,7 +101,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
locate = {
|
locate = {
|
||||||
prunePaths = [ "/mnt" "/nix" ];
|
prunePaths = ["/mnt" "/nix"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user