modules/virtualization: add virtualization module
This commit is contained in:
parent
2880e2dfd6
commit
9f44debc6e
3 changed files with 18 additions and 7 deletions
|
@ -7,8 +7,6 @@
|
|||
|
||||
(with profiles; [
|
||||
networking.wireless
|
||||
|
||||
virtualization
|
||||
])
|
||||
|
||||
./hardware-configuration.nix
|
||||
|
@ -40,6 +38,7 @@
|
|||
desktop = {
|
||||
gaming.enableAll = true;
|
||||
};
|
||||
virtualization.enable = true;
|
||||
};
|
||||
|
||||
networking.interfaces = {
|
||||
|
|
17
modules/modules/virtualization.nix
Normal file
17
modules/modules/virtualization.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
with lib.hlissner;
|
||||
let
|
||||
cfg = config.modules.virtualzation;
|
||||
in
|
||||
{
|
||||
options.modules.virtualization = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ pkgs, ... }: {
|
||||
virtualisation.libvirtd.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue