Files
NixOS-Configs/modules/apps/virt.nix
Anish Govind 598a43eace refactor: make hosts declarative and consolidate shared config
- add my.username / my.gaming.enable / my.ai.local.enable options and
  gate optional app modules on them instead of per-host import lists
- move vendor-neutral hardware.graphics into modules/graphical, leaving
  only NVIDIA-specific drivers and env vars in modules/hardware/nvidia
- derive the primary user everywhere from my.username (users, getty,
  home-manager, tmpfiles)
- de-duplicate Hyprland autostart down to a single system loginShellInit
  using the start-hyprland wrapper
- consolidate all nixpkgs overlays into modules/core/nix.nix and use
  final.stdenv.hostPlatform.system
- make the zsh rebuild helper target $(hostname) instead of hardcoded hades
- add nixpkgs follows for nixos-hardware, pi and comfy-ui (single nixpkgs)
- add .gitignore and a nixfmt flake formatter; format all nix files
- remove empty browser.nix/display-configuration.nix and rename
  local_ai.nix -> local-ai.nix
- document the my.* toggles in the README
2026-09-18 23:32:32 -07:00

65 lines
1.1 KiB
Nix

{ config, pkgs, ... }:
{
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
};
};
incus = {
enable = true;
ui.enable = true;
};
spiceUSBRedirection.enable = true;
};
networking.nftables.enable = true;
programs.virt-manager.enable = true;
users.users.${config.my.username}.extraGroups = [
"libvirtd"
"kvm"
"incus-admin"
];
environment.systemPackages = with pkgs; [
# Container management & inspection
dive
podman-tui
docker-compose
podman-compose
lazydocker
ctop
skopeo
buildah
# Distro isolation & integration
distrobox
boxbuddy
# Virtual machines & tools
qemu_kvm
virt-manager
virt-viewer
spice
spice-gtk
spice-protocol
virtio-win
win-spice
quickemu
quickgui
vagrant
];
}