This commit is contained in:
Casper V. Kristensen 2023-10-09 17:38:02 +02:00
parent 61e924f2b2
commit a03b76bc84
2 changed files with 25 additions and 0 deletions

View file

@ -8,6 +8,7 @@
./programs.nix ./programs.nix
./ssh.nix ./ssh.nix
./sway.nix ./sway.nix
./virtd.nix
./wofi.nix ./wofi.nix
]; ];
} }

24
modules/desktop/virtd.nix Normal file
View file

@ -0,0 +1,24 @@
{ home-manager, pkgs, ... }: {
# https://nixos.wiki/wiki/Virt-manager
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
environment.systemPackages = with pkgs; [ virt-manager ];
# Make virt-manager use QEMU/KVM by default
home-manager.users.caspervk = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
};
};
};
# Persist libvirt data
environment.persistence."/nix/persist" = {
directories = [
{ directory = "/var/lib/libvirt"; user = "root"; group = "root"; mode = "0755"; }
];
};
}