moar options
This commit is contained in:
32
modules/misc/virt-manager.nix
Normal file
32
modules/misc/virt-manager.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{lib, config, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.kop.virt-manager;
|
||||
in
|
||||
{
|
||||
options.kop.virt-manager = {
|
||||
enable = mkEnableOption "Enables virt-manager";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.dconf.enable = true; # virt-manager requires dconf to remember settings
|
||||
environment.systemPackages = with pkgs; [ virt-manager virtiofsd ];
|
||||
environment.sessionVariables.GSETTINGS_BACKEND = "keyfile";
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
users.users.${config.mainUser.name}.extraGroups = [ "libvirtd" ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user