Add GNOME Boxes configuration

This commit is contained in:
Joshua Yuen 2026-06-29 18:41:08 -04:00
parent ddf676d221
commit d3d3edd664
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
5 changed files with 58 additions and 0 deletions

View File

@ -14,4 +14,6 @@
]; ];
modules.gpg.signingKey = "0x530DA0331EFE99F5"; modules.gpg.signingKey = "0x530DA0331EFE99F5";
modules.gnomeBoxes.enable = true;
} }

View File

@ -7,6 +7,7 @@
./firefox.nix ./firefox.nix
./fonts.nix ./fonts.nix
./gdm.nix ./gdm.nix
./gnomeBoxes.nix
./hyprland.nix ./hyprland.nix
./localsend.nix ./localsend.nix
./network.nix ./network.nix

View File

@ -0,0 +1,41 @@
{
config,
lib,
pkgs,
username,
...
}:
with lib;
let
cfg = config.modules.gnomeBoxes;
in
{
config = mkIf cfg.enable {
virtualisation = {
libvirtd = {
enable = true;
# Enable TPM emulation (for Windows 11)
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
};
};
# Enable USD redirection
spiceUSBRedirection.enable = true;
};
# Allow VM management
users.groups.libvirtd.members = [ username ];
users.groups.kvm.members = [ username ];
# Enable VM networking and file sharing
environment.systemPackages = with pkgs; [
gnome-boxes
swtpm
dnsmasq
phodav
];
};
}

View File

@ -5,6 +5,7 @@
imports = [ imports = [
./discord.nix ./discord.nix
./displayManager.nix ./displayManager.nix
./gnomeBoxes.nix
./gpg.nix ./gpg.nix
./hyprland.nix ./hyprland.nix
./localsend.nix ./localsend.nix

View File

@ -0,0 +1,13 @@
{
lib,
...
}:
with lib;
{
options.modules.gnomeBoxes = {
enable = mkEnableOption {
default = false;
description = "Enable GNOME Boxes";
};
};
}