dotfiles/modules/virtualisation/virtualisation.nix

28 lines
458 B
Nix
Raw Permalink 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
programs.dconf.enable = true;
2022-10-15 20:00:09 +02:00
users.users.moritz = {
extraGroups = [ "libvirtd" ];
2023-05-31 15:54:35 +02:00
packages = with pkgs; [ virt-manager virt-viewer ];
2022-10-15 20:00:09 +02:00
};
2022-07-15 13:11:54 +02:00
};
}