virt toogle
This commit is contained in:
+16
-6
@@ -1,10 +1,20 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
in
|
||||
{
|
||||
programs.virt-manager.enable = true;
|
||||
users.groups.libvirtd.members = ["smayzy"];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
options.smayzy.virt.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable virt-manager and qemu";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
];
|
||||
config = mkIf config.smayzy.virt.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
users.groups.libvirtd.members = ["smayzy"];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user