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