add basic virtualization module

This commit is contained in:
Sakooooo 2023-08-03 22:56:04 +03:00
parent bf478eff12
commit bdaeffdefa
Signed by: sako
GPG key ID: 3FD715D87D7725E0
3 changed files with 25 additions and 0 deletions

View file

View file

@ -0,0 +1,5 @@
{
imports = [
./virt-manager.nix
];
}

View file

@ -0,0 +1,20 @@
{ outputs, options, config, lib, pkgs, ...}:
with lib;
let
cfg = config.modules.virtualization.libvirtd;
in
{
options.modules.virtualization.libvirtd = {
enable = mkEnableOption false;
};
config = mkIf cfg.enable {
virtualization.libvirtd.enable = true;
programs.dconf.enable = true;
environtment.systemPackages = with pkgs; [
virt-manager
];
users.users.sako.extraGroups = [ "libvirtd" ];
};
}