add basic virtualization module
This commit is contained in:
parent
bf478eff12
commit
bdaeffdefa
3 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./virt-manager.nix
|
||||||
|
];
|
||||||
|
}
|
20
modules/virtualization/virt-manager.nix
Normal file
20
modules/virtualization/virt-manager.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue