os/profiles/virt/default.nix

30 lines
732 B
Nix
Raw Normal View History

2020-01-07 06:44:54 +00:00
{ pkgs, ... }: {
virtualisation.libvirtd = {
enable = true;
qemuRunAsRoot = false;
};
# you'll need to add your user to 'libvirtd' group to use virt-manager
2020-12-16 04:41:19 +00:00
environment.systemPackages = with pkgs; [ virt-manager vagrant ];
environment.sessionVariables = {
VAGRANT_DEFAULT_PROVIDER = "libvirt";
};
2020-01-07 06:44:54 +00:00
2020-07-31 04:17:28 +00:00
nixpkgs.overlays =
let
overlay = final: prev: {
2020-01-07 06:44:54 +00:00
2020-07-31 04:17:28 +00:00
# Patch libvirt to use ebtables-legacy
libvirt =
if prev.libvirt.version <= "5.4.0" && prev.ebtables.version
> "2.0.10-4" then
prev.libvirt.overrideAttrs (o: { EBTABLES_PATH = "${final.ebtables}/bin/ebtables-legacy"; })
else
prev.libvirt;
};
in
[ overlay ];
2020-01-07 06:44:54 +00:00
}