Skip to content

Commit

Permalink
Make NixOS possible to be VM host (#793)
Browse files Browse the repository at this point in the history
* Install virt-manager on NixOS

* Add user settings for virt-manager
  • Loading branch information
kachick authored Sep 17, 2024
1 parent cb4802a commit 35e886f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions home-manager/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ in
"org.gnome.Rhythmbox3.desktop:3"
];
};

"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
};
}
8 changes: 8 additions & 0 deletions nixos/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ in
"networkmanager"
"wheel"
"input" # For finger print in GDM
"libvirtd" # For virt-manager
];
packages = [
# Don't install spotify, it does not activate IME and no binary cache with the unfree license.
Expand Down Expand Up @@ -92,6 +93,13 @@ in

services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];

# https://nixos.wiki/wiki/Virt-manager
#
# Alternative candidates: GNOME Boxes, virtualbox, vnware
# distrobox is a container based solution, not vm. And see https://github.com/89luca89/distrobox/issues/958
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;

programs = {
# https://github.com/nix-community/home-manager/blob/release-24.05/modules/misc/dconf.nix#L39-L42
dconf.enable = true;
Expand Down

0 comments on commit 35e886f

Please sign in to comment.