dotfiles/modules/virtualisation/virtualisation.nix
2022-07-30 16:34:19 +02:00

28 lines
503 B
Nix

{ config
, lib
, pkgs
, ...
}:
with lib;
let
cfg = config.my.virtualisation.libvirtd;
in
{
options.my.virtualisation.libvirtd = {
enable = mkOption {
default = false;
type = types.bool;
example = true;
};
};
config = mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
package = pkgs.stable.libvirt;
};
home-manager.users.moritz.home.packages = with pkgs; [ virt-manager ];
users.users.moritz.extraGroups = [ "libvirtd" ];
};
}