2024-10-11 23:27:07 +03:00
|
|
|
{
|
2024-11-04 04:37:29 +03:00
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
cfg = config.module.virtmanager;
|
|
|
|
in {
|
|
|
|
options.module.virtmanager.enable = lib.mkEnableOption "the VM support.";
|
2024-03-29 14:54:59 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
|
|
programs.virt-manager.enable = true;
|
2024-06-25 04:04:39 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
# HACK: Fixes bug: https://www.reddit.com/r/NixOS/comments/1afbjiu/i_get_a_nonetype_error_when_trying_to_launch_a_vm/
|
|
|
|
# May also need to run: `gsettings set org.gnome.desktop.interface cursor-theme "Adwaita"`
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
# glib
|
|
|
|
adwaita-icon-theme # default gnome cursors,
|
|
|
|
];
|
|
|
|
};
|
2024-03-04 00:34:39 +03:00
|
|
|
}
|