dotfiles/modules/virtualisation/virtualisation.nix

28 lines
483 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.libvirt;
};
environment.systemPackages = with pkgs; [ virt-manager ];
users.users.moritz.extraGroups = [ "libvirtd" ];
};
}