dendrify: comfy-station
This commit is contained in:
@@ -1,31 +1,33 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.hive.virt-manager;
|
||||
in {
|
||||
options.hive.virt-manager = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable the qemu-kvm + libvirt stack.
|
||||
'';
|
||||
{...}: {
|
||||
flake.nixosModules.virt-manager = {
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.hive.virt-manager;
|
||||
in {
|
||||
options.hive.virt-manager = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable the qemu-kvm + libvirt stack.
|
||||
'';
|
||||
};
|
||||
forUsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.singleLineStr;
|
||||
default = [];
|
||||
description = ''
|
||||
List of users that should be added to the libvirt group.
|
||||
'';
|
||||
};
|
||||
};
|
||||
forUsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.singleLineStr;
|
||||
default = [];
|
||||
description = ''
|
||||
List of users that should be added to the libvirt group.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
users.groups.libvirtd.members = cfg.forUsers;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
users.groups.libvirtd.members = cfg.forUsers;
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user