nix-git/modules/virt-manager.nix

30 lines
951 B
Nix
Raw Normal View History

2024-02-12 16:41:28 +01:00
{ config, pkgs, ... }:
{
# See also: boxes.nix
# libvirt is a dependency of Virt-manager
# https://nixos.wiki/wiki/Libvirt
virtualisation.libvirtd.enable = true;
2025-02-09 21:35:44 +01:00
users.users."yoda".extraGroups = [ "libvirtd" ];
2024-02-12 16:41:28 +01:00
# Required for USB redirection to work with GNOME boxes. Maybe this is also required for virt-Manager?
# See
# https://github.com/NixOS/nixpkgs/issues/39129#issuecomment-382569032
# https://www.reddit.com/r/NixOS/comments/177wcyi/comment/k4vok4n/
security.polkit.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
# https://nixos.wiki/wiki/Virt-manager
# TODO: nixpkgs virtio-win
programs.virt-manager.enable = true;
programs.dconf.enable = true;
2025-02-09 21:35:44 +01:00
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
2024-02-12 16:41:28 +01:00
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
};
}