1
1
mirror of https://github.com/divnix/digga.git synced 2024-11-23 20:22:04 +03:00

virt: init profile

This commit is contained in:
Timothy DeHerrera 2020-01-06 23:44:54 -07:00
parent b18c93a124
commit 0bf18acdd4
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122

24
profiles/virt/default.nix Normal file
View File

@ -0,0 +1,24 @@
{ pkgs, ... }: {
virtualisation.libvirtd = {
enable = true;
qemuRunAsRoot = false;
};
# you'll need to add your user to 'libvirtd' group to use virt-manager
environment.systemPackages = with pkgs; [ virt-manager ];
nixpkgs.overlays = let
overlay = final: prev: {
# 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 (oldAttrs: rec {
EBTABLES_PATH = "${final.ebtables}/bin/ebtables-legacy";
})
else
prev.libvirt;
};
in [ overlay ];
}