dotfiles/modules/virtualisation/virtualisation.nix

26 lines
411 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
{
2022-10-15 20:00:09 +02:00
options.my.virtualisation.libvirtd.enable = mkEnableOption "libvirtd";
2022-07-15 13:11:54 +02:00
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-15 20:00:09 +02:00
users.users.moritz = {
extraGroups = [ "libvirtd" ];
packages = with pkgs; [ virt-manager ];
};
2022-07-15 13:11:54 +02:00
};
}