virtd
This commit is contained in:
parent
61e924f2b2
commit
a03b76bc84
|
@ -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
24
modules/desktop/virtd.nix
Normal 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"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue