16 lines
348 B
Nix
16 lines
348 B
Nix
{ lib, config, pkgs, ... }:
|
|
let
|
|
cfg = config.libvirtd;
|
|
in
|
|
{
|
|
options.libvirtd = {
|
|
enable = lib.mkEnableOption "Enable libvirtd module";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
virtualisation.libvirtd.enable = true;
|
|
programs.virt-manager.enable = true;
|
|
users.users.${config.mainUser.userName}.extraGroups = [ "libvirtd" ];
|
|
};
|
|
|
|
}
|