feat: add virtualization
This commit is contained in:
@@ -15,5 +15,6 @@
|
||||
./wofi.nix
|
||||
./desktop.nix
|
||||
./zed-editor.nix
|
||||
./virtualization.nix
|
||||
];
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
nixd
|
||||
xfce.thunar
|
||||
altserver-linux
|
||||
xdg-desktop-portal
|
||||
];
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
@@ -52,6 +53,7 @@
|
||||
wofi.enable = true;
|
||||
services.upower.enable = true;
|
||||
zed.enable = true;
|
||||
virt.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
|
||||
21
nix/modules/virtualization.nix
Normal file
21
nix/modules/virtualization.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user