feat: add virtualization

This commit is contained in:
2025-07-24 14:46:23 -07:00
parent 4cfc6ac389
commit d2ca9ded39
3 changed files with 24 additions and 0 deletions

View File

@@ -15,5 +15,6 @@
./wofi.nix ./wofi.nix
./desktop.nix ./desktop.nix
./zed-editor.nix ./zed-editor.nix
./virtualization.nix
]; ];
} }

View File

@@ -39,6 +39,7 @@
nixd nixd
xfce.thunar xfce.thunar
altserver-linux altserver-linux
xdg-desktop-portal
]; ];
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
@@ -52,6 +53,7 @@
wofi.enable = true; wofi.enable = true;
services.upower.enable = true; services.upower.enable = true;
zed.enable = true; zed.enable = true;
virt.enable = true;
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];

View File

@@ -0,0 +1,21 @@
{
pkgs,
lib,
config,
...
}:
{
options.virt = {
enable = lib.mkEnableOption "enable virtualization";
};
config = lib.mkIf config.virt.enable {
programs.virt-manager.enable = true;
users.groups.libvirtd.members = [ "luca" ];
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
};
}