31 lines
599 B
Nix
31 lines
599 B
Nix
{ pkgs, config, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.eboskma.libvirtd;
|
|
in
|
|
{
|
|
options.eboskma.libvirtd = { enable = mkEnableOption "libvirtd"; };
|
|
|
|
config = mkIf (cfg.enable) {
|
|
virtualisation.libvirtd = {
|
|
enable = true;
|
|
};
|
|
networking = {
|
|
interfaces = {
|
|
br0 = {
|
|
useDHCP = true;
|
|
macAddress = "04:d9:f5:f9:c2:c6";
|
|
};
|
|
};
|
|
|
|
bridges = {
|
|
"br0" = {
|
|
interfaces = [ "enp4s0" ];
|
|
# rstp = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
users.users.${config.eboskma.var.mainUser}.extraGroups = [ "libvirtd" ];
|
|
};
|
|
}
|