dotfiles/modules/virtualisation/virtualisation.nix

29 lines
483 B
Nix
Raw Normal View History

2022-07-15 13:11:54 +02:00
{ 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;
2022-09-01 11:11:58 +02:00
package = pkgs.libvirt;
2022-07-15 13:11:54 +02:00
};
2022-10-06 20:32:21 +02:00
environment.systemPackages = with pkgs; [ virt-manager ];
2022-07-15 13:11:54 +02:00
users.users.moritz.extraGroups = [ "libvirtd" ];
};
}